diff options
author | Tom Lane | 2009-09-12 15:51:52 +0000 |
---|---|---|
committer | Tom Lane | 2009-09-12 15:51:52 +0000 |
commit | b1769d1f1c3214f009890a6eec9fd038d6196491 (patch) | |
tree | 9b18b22e36dfbfa3269b44147da5c77c97376045 | |
parent | 77e653f8c95d2e32362b0a77b21330c2d9cc5ea8 (diff) |
Install a hopefully-temporary workaround for Snow Leopard readdir() bug.
If Apple doesn't fix that reasonably soon, we'll have to consider
back-patching a workaround; but for now, just hack it in HEAD so that
we can get buildfarm reports on HEAD from OS X machines.
Per Jan Otto.
-rw-r--r-- | src/backend/commands/tablespace.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 75f772f0e4..f119cf056a 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -612,6 +612,17 @@ remove_tablespace_directories(Oid tablespaceoid, bool redo) subfile))); pfree(subfile); + + /* + * OS X 10.6 and 10.6.1 have a bug in readdir() that causes the + * next call to fail after deleting the current element. Hopefully + * that will be fixed real soon, but for the moment we have this + * ugly kluge to restart the directory scan. + */ +#ifdef __darwin__ + FreeDir(dirdesc); + dirdesc = AllocateDir(location); +#endif } FreeDir(dirdesc); |