Skip to main content
Version: 2.x

pg_stat_progress_cluster

The pg_stat_progress_cluster view shows the progress of CLUSTER and VACUUM FULL operations. Each row represents a backend process currently executing one of these commands, providing details such as the current phase, number of heap blocks scanned and written, and indexes rebuilt. This view helps monitor and manage long-running table reorganization tasks.

ColumnTypeDescription
gp_segment_idintegerUnique identifier of a segment (or coordinator) instance. (This column is not present in the gp_stat_progress_cluster_summary view.)
pidintegerProcess identifier of the backend, or the coordinator process identifier if the gp_stat_progress_cluster_summary view.
datidoidThe object identifier of the database to which this backend is connected.
datnamenameName of the database to which this backend is connected.
relidoidThe object identifier of the table being clustered.
commandtextThe name of the command that is running. Either CLUSTER or VACUUM FULL.
phasetextCurrent processing phase.
cluster_index_relidoidIf the table is being scanned using an index, this is the object identifier of the index being used; otherwise, it is zero. This field is not applicable to AO/CO tables.
heap_tuples_scannedbigintFor heap tables, heap_tuples_scanned records the number of tuples scanned, including both live and dead tuples. For AO tables, heap_tuples_scanned records the number of live tuples scanned, excluding the dead tuples. This counter only advances when the phase is seq scanning append-optimized, seq scanning heap, index scanning heap, or writing new heap. For AO/CO tables, Apache Cloudberry converts byte size into equivalent heap blocks in size.
heap_tuples_writtenbigintNumber of tuples written. This counter only advances when the phase is seq scanning heap, index scanning heap, writing new append-optimized, or writing new heap.
heap_blks_totalbigintTotal number of heap blocks in the table. This number is reported as of the beginning of seq scanning heap. For AO/CO tables, Apache Cloudberry converts byte size into equivalent heap blocks in size.
heap_blks_scannedbigintNumber of heap blocks scanned. This counter only advances when the phase is seq scanning heap. For AO/CO tables, Apache Cloudberry converts byte size into equivalent heap blocks in size.
index_rebuild_countbigintNumber of indexes rebuilt. This counter only advances when the phase is rebuilding index, and is not applicable to AO/CO tables.