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