Some more information on the readdir() failure.
I investigated the way GNU handled the problem with rm for Darwin.
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/remove.c
[Note the current version of this file no longer uses readdir() - more below]
It appears that readdir() can fail:
1)
ok. thanks, when my project will move to 8.4, I `ll re-do this test.
From: Tom Lane
To: Kevin Grittner
Cc: Robert Haas ; assaf lehr ;
pgsql-bugs@postgresql.org
Sent: Thu, November 5, 2009 5:21:28 PM
Subject: Re: [BUGS] BUG #5165: Poor performance with Left-jo