Re: RelationCreateStorage can orphan files - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RelationCreateStorage can orphan files
Date
Msg-id 208.1284604325@sss.pgh.pa.us
Whole thread Raw
In response to Re: RelationCreateStorage can orphan files  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: RelationCreateStorage can orphan files
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Sep 15, 2010 at 9:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> That design is intentional. �If the file create fails, and you've
>> already written a WAL record that says you created it, you are flat
>> out screwed. �You can't even PANIC --- if you do, then the replay of
>> the WAL record will likely fail and PANIC again, leaving the database
>> dead in the water.

> Not that this is perhaps more than of academic interest, but could you
> get around this problem by making the replay of the XLOG record defer
> the creation of the file until such time as it's actually written to
> or the creating XID commits?  And also, if the XID does not commit,
> going back and trying to remove the file (on a best effort basis)?

Perhaps, but it seems like a lot more complexity than is justified
by the problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: patch: SQL/MED(FDW) DDL
Next
From: Robert Haas
Date:
Subject: Re: RelationCreateStorage can orphan files