pg_stat_progress_cluster translates REPACK into VACUUM FULL when pg_stat_progress_repack.repack_index_relid is zero, and into CLUSTER otherwise. Previously, repack_index_relid was set only when an index scan was used. When REPACK used a sequential scan and sort to order the table by an index, the field remained zero even though index ordering had been requested. As a result, pg_stat_progress_cluster incorrectly reported the command as VACUUM FULL instead of CLUSTER. Fix this by setting repack_index_relid to the OID of the requested ordering index when progress reporting starts, regardless of the scan method. This allows pg_stat_progress_cluster to correctly report REPACK as CLUSTER when index ordering is requested. Also update the documentation to clarify the meaning of the index columns and how REPACK is translated into CLUSTER or VACUUM FULL. Suggested-by: Fujii Masao <masao.fujii@gmail.com> Author: Chao Li <lic@highgo.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Discussion: https://postgr.es/m/CAN4CZFMzy2V_wvRCBW5K8=wVCk1-C7nq=8otXO=u+s_1KZHqyA@mail.gmail.com Backpatch-through: 19
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/19/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/19/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.