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

From Tom Lane
Subject Re: Advice on MyXactMade* flags, MyLastRecPtr, pendingDeletes and lazy XID assignment
Date
Msg-id 1707.1188488642@sss.pgh.pa.us
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:
> Tom Lane wrote:
>> +1 on the first, but -1 on the second, because we'd have to track
>> whether deleted files are temp or not ... it's very unclear that it'd
>> be worth the trouble.

> I'm confused. smgrcreate already tracks if it created a file for a temp
> relation or not (at least it has an isTemp parameter, which it also
> stores in the delete list).

Doh, I was thinking it did not track that --- serves me right for not
checking the code before opining.

>> 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.

Hmm.  Seems like a lot of work for something that's not a large problem.
Anyway, I'd counsel not thinking about that for now, but keep the patch
focused on solving one problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Why is there a tsquery data type?
Next
From: Gregory Stark
Date:
Subject: Re: Why is there a tsquery data type?