Re: REPACK: warn about skipping foreign partitions

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: shihao zhong <zhong950419(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Antonin Houska <ah(at)cybertec(dot)at>
Subject: Re: REPACK: warn about skipping foreign partitions
Date: 2026-10-10 17:27:59
Message-ID: CAN4CZFMopTE=U6oqz1aTSHyQsCV47HkMXqctt+xh94-aCGKSDA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v4-0001-Warn-when-REPACK-or-CLUSTER-skips-a-foreign-table.patch application/octet-stream 8.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2026-10-10 17:57:47 Re: Policy for Abandoned Extensions
Previous Message Tom Lane 2026-10-10 17:15:27 Re: Policy for Abandoned Extensions