This is the mail archive of the
mailing list for the Cygwin project.
Re: postgres panic error
Caveat: I really don't know what I'm talking about, but I'm in a rambling
On Wed, 10 Dec 2003, Jason Tishler wrote:
> On Tue, Dec 09, 2003 at 04:18:06PM -0800, Yurgis Baykshtis wrote:
> > I tried to raise the question on pg-hackers forum and cygwin forum
> > (regarding readdir() misbehavior) but could not get any help so far :(
> If you can produce a minimal test case that reproduces the problem, then
> one of the core Cygwin developers might be more willing to attempt to
> fix it.
1.) The Solaris man page for readdir says:
If a file is removed from or added to the directory after
the most recent call to opendir(3C) or rewinddir(3C),
whether a subsequent call to readdir() returns an entry for
that file is unspecified.
Is this accounted for?
2.) Is this comment in syscalls.cc relevent?
/* Close all files and process any queued deletions.
Lots of unix style applications will open a tmp file, unlink it,
but never call close. This function is called by _exit to
ensure we don't leave any such files lying around. */
3.) Likewise in delqueue.cc:
/* FIXME: this delqueue module is very flawed and should be rewritten.
First, having an array of a fixed size for keeping track of the
unlinked but not yet deleted files is bad. Second, some programs
will unlink files and then create a new one in the same location
and this behavior is not supported in the current code. Probably
we should find a move/rename function that will work on open
and move delqueue files to some special location or some such
Doesn't rename work while files are open? I am pretty sure I have done it
on XP and NT4. I should/will just go check the archives. I know this has
been beaten to death.
3.) I don't think that Cygwin's readdir accounts for the "to be deleted
queue" or FILE_FLAG_DELETE_ON_CLOSE, PTC? What OS was this again?
HTH and wasn't all just rambling :). Feel free to dig in yourself.
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html