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

From cca5507
Subject Handle concurrent drop when doing whole database vacuum
Date
Msg-id tencent_F9D483523BB0D082C2EFDA80142F192DBC07@qq.com
Whole thread
Responses Re: Handle concurrent drop when doing whole database vacuum
Re: Handle concurrent drop when doing whole database vacuum
Re: Handle concurrent drop when doing whole database vacuum
List 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

pgsql-hackers by date:

Previous
From: Shinya Kato
Date:
Subject: doc: Remove stale entry for removed aclitem[] ~ aclitem operator
Next
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition