Thank you for the review! > So, for example, if the user lacks privileges on a foreign partition, > VACUUM/VACUUM FULL report a permission warning, whereas CLUSTER/REPACK > report that foreign tables cannot be processed.
That was an oversight, it's fixed in v4. > In v3, CLUSTER/REPACK warn about foreign partitions during partition > collection, without locking them or checking privileges. OTOH, > VACUUM/VACUUM FULL warn only after locking each partition and > checking privileges. The 'without locking' part seems good to me. We already have AccessExclusiveLock on the parent, and we never actually open the foreign partitions. And this is a preexisting repack design (checking permissions without locking first, and then checking again after locking, just before processing it)
v4-0001-Warn-when-REPACK-or-CLUSTER-skips-a-foreign-table.patch
Description: Binary data
