Re: Handle concurrent drop when doing whole database vacuum

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, cca5507 <cca5507(at)qq(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com>
Subject: Re: Handle concurrent drop when doing whole database vacuum
Date: 2026-06-30 15:30:25
Message-ID: akPhEffRipH4isWF@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 30, 2026 at 01:47:41PM +0900, Michael Paquier wrote:
> Something that still feels off to me is to blindly use _ext() in
> vacuum_is_permitted_for_relation(), where we *may* already hold a lock
> on the relation whose ACL is checked. In this case missing a relation
> is not fine, so this would make the code more brittle in the
> single-relation case under autovacuum or a VACUUM with a list of
> relations provided by a user.

Yeah, so we should only use it for get_all_vacuum_rels(), as in the
attached.

--
nathan

Attachment Content-Type Size
v8-0001-handle-concurrent-drop-in-database-wide-vacuum.patch text/plain 3.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2026-06-30 15:55:03 Re: use of SPI by postgresImportForeignStatistics
Previous Message Tomas Vondra 2026-06-30 15:25:13 Re: occasional ECPG failures on dikkop (FreeBSD)