| From: | cca5507 <cca5507(at)qq(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Handle concurrent drop when doing whole database vacuum |
| Date: | 2026-06-14 07:12:43 |
| Message-ID: | tencent_F9D483523BB0D082C2EFDA80142F192DBC07@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi hackers,
When doing a whole database vacuum, we scan pg_class to construct
a list of vacuumable tables. For each vacuumable table, we call
vacuum_is_permitted_for_relation() to check permissions. If a
concurrent drop happens, the pg_class_aclcheck() might report an
error because of failing to search the syscache:
ERROR: relation with OID ****** does not exist
To fix it, we can use pg_class_aclcheck_ext() to detect the concurrent
drop and report a warning instead.
Note that a concurrent drop after constructing the list of vacuumable
tables is handled by vacuum_open_relation().
Thoughts?
--
Regards,
ChangAo Chen
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Handle-concurrent-drop-when-doing-whole-database-.patch | application/octet-stream | 2.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2026-06-14 07:19:24 | Re: Row pattern recognition |
| Previous Message | Shinya Kato | 2026-06-14 04:42:57 | doc: Remove stale entry for removed aclitem[] ~ aclitem operator |