Re: REPACK: warn about skipping foreign partitions - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: REPACK: warn about skipping foreign partitions
Date
Msg-id CAN4CZFMopTE=U6oqz1aTSHyQsCV47HkMXqctt+xh94-aCGKSDA@mail.gmail.com
Whole thread
In response to Re: REPACK: warn about skipping foreign partitions  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: REPACK: warn about skipping foreign partitions
List pgsql-hackers
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)

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Policy for Abandoned Extensions
Next
From: Joe Conway
Date:
Subject: Re: Policy for Abandoned Extensions