]> granicus.if.org Git - postgresql/commitdiff
Revert the temporary patch to work around Snow Leopard readdir() bug.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 10 Nov 2009 18:53:38 +0000 (18:53 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 10 Nov 2009 18:53:38 +0000 (18:53 +0000)
Apple has fixed that bug in 10.6.2, and we should encourage users to
update to that version rather than trusting this cosmetic patch.
As was recently noted by Stephen Tyler, this patch was only masking
the problem in the context of DROP TABLESPACE, but the failure could
occur in other places such as pg_xlog cleanup.

src/backend/commands/tablespace.c

index eef2eb61e9f954518b96dab371a320a6bcb1231b..595fb330b62261ca706ac4880214ea7d4203646f 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.62 2009/09/12 15:51:52 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.63 2009/11/10 18:53:38 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -612,17 +612,6 @@ 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);