From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: including backend ID in relpath of temp rels - updated patch |
Date: | 2010-08-12 18:12:25 |
Message-ID: | AANLkTik7xw5M62NUNSqXCLxVBrtQVs0CVEpXgR8MSaWn@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Aug 12, 2010 at 2:06 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.
That seems like a good idea. I'll post an updated patch.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-08-12 18:13:54 | Re: libpq and TOO MANY CONNECTIONS |
Previous Message | Tom Lane | 2010-08-12 18:06:24 | Re: including backend ID in relpath of temp rels - updated patch |