Re: Handle concurrent drop when doing whole database vacuum - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Handle concurrent drop when doing whole database vacuum
Date
Msg-id CALj2ACVHYbaVnMx6KFSjh3BtHAG2tUWX1G9hhM87TCVJWe_nig@mail.gmail.com
Whole thread
In response to Re: Handle concurrent drop when doing whole database vacuum  ("cca5507" <cca5507@qq.com>)
Responses Re: Handle concurrent drop when doing whole database vacuum
List pgsql-hackers
Hi,

On Sat, Jun 27, 2026 at 1:19 AM cca5507 <cca5507@qq.com> wrote:
>
> > Do you mind sharing the vacuum-related fix where we have agreement in
> > this thread? Thank you!
>
> Please see the v5 patch.

LGTM.

+ *
+ * Note: the relation must be locked to prevent a concurrent drop.
  */

I would have considered adding an
Assert(CheckRelationOidLockedByMe(relid, AccessShareLock, true))
instead of the note, but that seems like overkill to me. So, I'm fine
without it.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Move FOR PORTION OF checks out of analysis
Next
From: Bharath Rupireddy
Date:
Subject: Re: Do not lock tables in get_tables_to_repack