Stephen Tyler wrote:
> I have found readdir() calls in:
> src/port/dirent.c
> src/port/dirmod.c
> src/bin/initdb/initdb.c
> src/bin/pg_resetxlog/pg_resetxlog.c
> src/bin/psql/create_help.pl
> src/tools/msvc/Install.pm
> src/tools/msvc/Mkvcbuild.pm
> src/backend/storage/file/fd.c
> contrib/pg_standby/pg_standby.c
>
> I don't know which of the above depend on the "unspecified" readdir
> behaviour (beyond dirmod.c), and are thus prone to failure on Mac OS X.
Probably the most relevant one is in storage/file/fd.c, in AllocateDir,
which is used in a lot of places, some of which do delete files: for
example the one in RemoveOldXlogFiles probably explains the pg_xlog
failures, and SlruScanDirectory explains the pg_clog failures (along
with others). I wouldn't be surprised if others like the ones in
RelationCacheInitFileRemove and RelationCacheInitFileRemoveInDir need
patching as well.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support