Re: Handle concurrent drop when doing whole database vacuum

From: cca5507 <cca5507(at)qq(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, suryapoondla4 <suryapoondla4(at)gmail(dot)com>
Subject: Re: Handle concurrent drop when doing whole database vacuum
Date: 2026-06-29 04:37:39
Message-ID: tencent_AD5D52285621586D53CA904C2C9EDA81BA06@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > > 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.
> >
> > An assertion is impossible to miss, acts as self-documentation and it
> > is not a performance critical path.  A note at the top of the function
> > could be easily missed.  I don't see why the note needs to mention the
> > case of a concurrent drop.  So let's just keep the runtime check, then
> > drop the note, finally call it a day.
>
> Works for me. Thanks.

Fixed.

--
Regards,
ChangAo Chen

Attachment Content-Type Size
v6-0001-Do-not-check-permissions-in-get_all_vacuum_rels.patch application/octet-stream 1.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ayush Tiwari 2026-06-29 04:41:06 Re: Remove the refint contrib module (for v20)
Previous Message Amit Kapila 2026-06-29 04:37:00 Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server