From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Warn when REPACK or CLUSTER skips foreign partitions
Date: Fri, 16 Oct 2026 15:29:51 +0000
Message-ID: <E1xHjsV-00000001tm3-3CBN@gemulon.postgresql.org> (raw)
Warn when REPACK or CLUSTER skips foreign partitions
Previously, REPACK and CLUSTER silently skipped foreign-table partitions
when processing a partitioned table, leaving users unaware that some
partitions had not been processed. In contrast, VACUUM FULL warns when
skipping such partitions.
Emit a warning for each skipped foreign-table partition. Inspect the
table's partition tree even when an index is specified, because foreign
tables have no indexes and therefore do not appear in the index's
partition tree. Check privileges before issuing the warning, so that
users without the required privileges receive a permission warning
instead, as with VACUUM FULL.
Note that database-wide REPACK and CLUSTER continue to skip foreign
tables silently, consistent with database-wide VACUUM FULL.
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Antonin Houska <ah@cybertec.at>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: shihao zhong <zhong950419@gmail.com>
Reviewed-by: Surya Poondla <suryapoondla4@gmail.com>
Reviewed-by: solai v <solai.cdac@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAN4CZFNXFdkmOCnt8m=K_A4i3LQC+59nx59Y=5bsH4vehQHTTw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/af090508018be5ace443ba6e2814500c10842a4d
Modified Files
--------------
doc/src/sgml/ref/cluster.sgml | 5 +++--
doc/src/sgml/ref/repack.sgml | 3 ++-
src/backend/commands/repack.c | 41 ++++++++++++++++++++++++++++++++++-
src/test/regress/expected/cluster.out | 36 ++++++++++++++++++++++++++++++
src/test/regress/sql/cluster.sql | 28 ++++++++++++++++++++++++
5 files changed, 109 insertions(+), 4 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Warn when REPACK or CLUSTER skips foreign partitions
In-Reply-To: <E1xHjsV-00000001tm3-3CBN@gemulon.postgresql.org>
References: <E1xHjsV-00000001tm3-3CBN@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox