Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1AB0047607D for ; Fri, 24 Jan 2003 20:14:05 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 98CE7476167 for ; Fri, 24 Jan 2003 20:12:08 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0P1C75u028127; Fri, 24 Jan 2003 20:12:07 -0500 (EST) To: Stephan Szabo Cc: Josh Berkus , Noah Silverman , pgsql-performance@postgresql.org Subject: Re: WEIRD CRASH?!?! In-reply-to: <20030124162229.K38264-100000@megazone23.bigpanda.com> References: <20030124162229.K38264-100000@megazone23.bigpanda.com> Comments: In-reply-to Stephan Szabo message dated "Fri, 24 Jan 2003 16:27:50 -0800" Date: Fri, 24 Jan 2003 20:12:06 -0500 Message-ID: <28126.1043457126@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/311 X-Sequence-Number: 958 Stephan Szabo 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