Re: Advice on MyXactMade* flags, MyLastRecPtr, pendingDeletes and lazy XID assignment - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Advice on MyXactMade* flags, MyLastRecPtr, pendingDeletes and lazy XID assignment
Date
Msg-id 87ejhl5eg7.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Advice on MyXactMade* flags, MyLastRecPtr, pendingDeletes and lazy XID assignment  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: Advice on MyXactMade* flags, MyLastRecPtr, pendingDeletes and lazy XID assignment  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-hackers
"Florian G. Pflug" <fgp@phlo.org> writes:

>>> It seems doable, but it's not pretty. One possible scheme would be to
>>> emit a record *after* chosing a name but *before* creating the file,
>>
>> No, because the way you know the name is good is a successful
>> open(O_CREAT).
>
> The idea was to log *twice*. Once the we're about to create a file, and
> the second time that we succeeded. That way, the filename shows up in the
> log, even if we crash immediatly after physically creating the file, which
> gives recovery at least a chance to clean up the mess.

It sounds like if the reason it fails is because someone else created the same
file name you'll delete the wrong file?

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [DOCS] Contrib modules documentation online
Next
From: Peter Eisentraut
Date:
Subject: Re: [DOCS] Contrib modules documentation online