Re: including backend ID in relpath of temp rels - updated patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: including backend ID in relpath of temp rels - updated patch
Date: 2010-08-12 18:06:24
Message-ID: 2299.1281636384@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Aug 12, 2010 at 12:27 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-08-12 18:12:25 Re: including backend ID in relpath of temp rels - updated patch
Previous Message Pavel Stehule 2010-08-12 18:02:44 Re: review: xml_is_well_formed