Re: BUG #5166: readdir() failure on Mac OS-X is HFS "feature" - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #5166: readdir() failure on Mac OS-X is HFS "feature"
Date
Msg-id 20091105133202.GF3694@alvh.no-ip.org
Whole thread Raw
In response to BUG #5166: readdir() failure on Mac OS-X is HFS "feature"  ("Stephen Tyler" <stephen@stephen-tyler.com>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: tomas@tuxteam.de
Date:
Subject: Re: BUG #5168: cannot login to server
Next
From: assaf lehr
Date:
Subject: Re: BUG #5165: Poor performance with Left-join where right side does not exist