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

From cca5507
Subject Re: Handle concurrent drop when doing whole database vacuum
Date
Msg-id tencent_515EB50C2919321578C207247632A1218508@qq.com
Whole thread
In response to Re: Handle concurrent drop when doing whole database vacuum  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Handle concurrent drop when doing whole database vacuum
List pgsql-hackers
Hi,

> I had a quick look at the repack code and it seems like it can also
> run into the same problem because repack_is_permitted_for_relation
> uses the same pg_class_aclcheck while building the tables list without
> holding locks, and later it rechecks permissions after the table locks
> in cluster_rel_recheck anyway. A simple fix there would be to just use
> pg_class_aclcheck_ext in repack_is_permitted_for_relation. I recommend
> discussing this in a separate thread CC-ing the repack authors to get
> agreement.

Note that we call ConditionalLockRelationOid() in get_tables_to_repack(),
which is an unexpected behavior I think. I have reported this issue in this
thread:

https://www.postgresql.org/message-id/flat/tencent_9F290B256A3F52B66542F1140E32ECC64309%40qq.com

> Do you mind sharing the vacuum-related fix where we have agreement in
> this thread? Thank you!

Please see the v5 patch.

--
Regards,
ChangAo Chen

Attachment

pgsql-hackers by date:

Previous
From: Shinya Kato
Date:
Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples
Next
From: Bharath Rupireddy
Date:
Subject: Re: Add tests for concurrent DML retry paths in logical replication apply