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 <[email protected]> Reviewed-by: Antonin Houska <[email protected]> Reviewed-by: Bharath Rupireddy <[email protected]> Reviewed-by: shihao zhong <[email protected]> Reviewed-by: Surya Poondla <[email protected]> Reviewed-by: solai v <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/CAN4CZFNXFdkmOCnt8m=K_A4i3LQC+59nx59Y=5bsh4vehqh...@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(-)
