Re: Autovacuum breakage from a734fd5d1

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Autovacuum breakage from a734fd5d1
Date: 2016-11-28 02:49:10
Message-ID: CAB7nPqRFtruQXqgD78BrPmNKU3zFRvpu+7x6ScGyMnYURgCCKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 28, 2016 at 11:46 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
>> In order to reproduce the failure I have just inserted a manual
>> pg_usleep before looping through the list of orphan_oids, and after
>> dropping manually from another session a couple of orphaned temporary
>> tables I was able to see the failure. Attached is a proposal of patch.
>
> That's not really adequate, because acquiring the lock doesn't prove that
> the table still exists; you might just be holding a useless lock against
> a now-unused OID. You really need to do something to verify that the
> table's catalog entries are still visible after you have the lock.

Self-meh. That's where try_relation_open() would have been better...
Now it does not matter much, thanks for the input.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-11-28 03:03:48 Re: UNDO and in-place update
Previous Message Amit Kapila 2016-11-28 02:49:02 Re: Parallel bitmap heap scan