pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Noah Silverman <noah@allresearch.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: WEIRD CRASH?!?!
Date: Fri, 24 Jan 2003 20:12:06 -0500
Message-ID: <28126.1043457126@sss.pgh.pa.us> (raw)
In-Reply-To: <20030124162229.K38264-100000@megazone23.bigpanda.com>
References: <20030124162229.K38264-100000@megazone23.bigpanda.com>

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



view thread (15+ messages)  latest in thread

Message-ID: <28126.1043457126@sss.pgh.pa.us>
Permalink:  ../28126.1043457126@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28126.1043457126@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sszabo@megazone23.bigpanda.com, josh@agliodbs.com, noah@allresearch.com
  Subject: Re: WEIRD CRASH?!?!
  In-Reply-To: <28126.1043457126@sss.pgh.pa.us>
  References: <20030124162229.K38264-100000@megazone23.bigpanda.com> <28126.1043457126@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox