Re: Handle concurrent drop when doing whole database vacuum

From: cca5507 <cca5507(at)qq(dot)com>
To: surya poondla <suryapoondla4(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Handle concurrent drop when doing whole database vacuum
Date: 2026-06-23 05:20:47
Message-ID: tencent_AEEC50A342AF5A87145E99373CA2034D3B07@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Surya,

> A few suggestions:
> In vacuum.c:
> 1) The header comment on vacuum_is_permitted_for_relation() still describes only the permission-check path.  
> Now that the function also signals "relation no longer exists", the header should mention both cases.
> 2) A one-line comment at the pg_class_aclcheck_ext() call explaining why the _ext variant is needed (concurrent drop in the whole-database
> list-construction path) would help future readers, and guard against a cleanup patch that silently reverts to pg_class_aclcheck().

Fixed.

> In vacuum_concurrent_drop.spec:
> 1) The spec sets "client_min_messages = ERROR", which suppresses the very WARNING the patch emits.
> Let's have the client_min_messages to WARNING, so we see the warning in the .out file.

Fixed. We need to grant pg_maintain to regress_vacuum to avoid "permission denied ..."
warnings. For versions (< 17) which don't have pg_maintain role, we may still want to use
"client_min_messages = ERROR".

> 2) Minor comment, maybe adding the ANALYZE permutation (or a sibling spec) would test that code path too. (Not a mandatory thing but a good to have)

Fixed.

--
Regards,
ChangAo Chen

Attachment Content-Type Size
v3-0001-Handle-concurrent-drop-when-doing-whole-database-.patch application/octet-stream 3.4 KB
v3-0002-Add-test-case-for-vacuum-with-a-concurrent-drop.patch application/octet-stream 5.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-06-23 05:27:48 Re: Proposal: Conflict log history table for Logical Replication
Previous Message Kyotaro Horiguchi 2026-06-23 04:49:09 Re: md5_password_warnings for password auth with MD5-encrypted passwords