pgsql: Warn when REPACK or CLUSTER skips foreign partitions
pgsql: Warn when REPACK or CLUSTER skips foreign partitions
От:
Fujii Masao <fujii@postgresql.org>
Дата:
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 Reviewed-by: Antonin Houska Reviewed-by: Bharath Rupireddy Reviewed-by: shihao zhong Reviewed-by: Surya Poondla Reviewed-by: solai v Reviewed-by: Fujii Masao 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(-)