Re: WEIRD CRASH?!?! - Mailing list pgsql-performance

From Tom Lane
Subject Re: WEIRD CRASH?!?!
Date
Msg-id 28126.1043457126@sss.pgh.pa.us
Whole thread Raw
In response to Re: WEIRD CRASH?!?!  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: WEIRD CRASH?!?!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> The question is why did it get confused and end up linking to a filename
> that already existed?

The message comes from InstallXLogFileSegment(), which is careful to
ensure that the link() cannot fail, either by unlinking the previous
file, or searching for an unused name.  But it failed anyway.

It seems to me that there are only two possible explanations: a race
condition (but holding ControlFileLock should prevent that) or
BasicOpenFile() failed for a reason other than nonexistence of the file.

Hmm ... I wonder if Noah's machine could have been running out of kernel
file table slots, or something like that?  It does seem that it'd be
more robust to use something like stat(2) to probe for an existing file.

            regards, tom lane

pgsql-performance by date:

Previous
From: Rod Taylor
Date:
Subject: Re: WEIRD CRASH?!?!
Next
From: Noah Silverman
Date:
Subject: Re: WEIRD CRASH?!?!