Re: including backend ID in relpath of temp rels - updated patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: including backend ID in relpath of temp rels - updated patch
Date
Msg-id 2299.1281636384@sss.pgh.pa.us
Whole thread Raw
In response to Re: including backend ID in relpath of temp rels - updated patch  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: including backend ID in relpath of temp rels - updated patch
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Aug 12, 2010 at 12:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Lastly, it bothers me that you've put in code to delete files belonging
>> to temp rels during crash restart, without any code to clean up their
>> catalog entries. �This will therefore lead to dangling pg_class
>> references, with uncertain but probably not very nice consequences.

> I thought about this pretty carefully, and I don't believe that there
> are any unpleasant consequences.  The code that assigns relfilenode
> numbers is pretty careful to check that the newly assigned value is
> unused BOTH in pg_class and in the directory where the file will be
> created, so there should be no danger of a number getting used over
> again while the catalog entries remain.  Also, the drop-object code
> doesn't mind that the physical storage doesn't exist; it's perfectly
> happy with that situation.

Well, okay, but I'd suggest adding comments to the drop-table code
pointing out that it is now NECESSARY for it to not complain if the file
isn't there.  This was never a design goal before, AFAIR --- the fact
that it works like that is kind of accidental.  I am also pretty sure
that there used to be at least warning messages for that case, which we
would now not want.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: review: xml_is_well_formed
Next
From: Robert Haas
Date:
Subject: Re: including backend ID in relpath of temp rels - updated patch