mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
Add progress reporting for CLUSTER and VACUUM FULL.
This uses the same progress reporting infrastructure added in commit
c16dc1aca5
and extends it to these
additional cases. We lack the ability to track the internal progress
of sorts and index builds so the information reported is
coarse-grained for some parts of the operation, but it still seems
like a significant improvement over having nothing at all.
Tatsuro Yamada, reviewed by Thomas Munro, Masahiko Sawada, Michael
Paquier, Jeff Janes, Alvaro Herrera, Rafia Sabih, and by me. A fair
amount of polishing also by me.
Discussion: http://postgr.es/m/59A77072.3090401@lab.ntt.co.jp
This commit is contained in:
@@ -34,4 +34,27 @@
|
||||
#define PROGRESS_VACUUM_PHASE_TRUNCATE 5
|
||||
#define PROGRESS_VACUUM_PHASE_FINAL_CLEANUP 6
|
||||
|
||||
/* Progress parameters for cluster */
|
||||
#define PROGRESS_CLUSTER_COMMAND 0
|
||||
#define PROGRESS_CLUSTER_PHASE 1
|
||||
#define PROGRESS_CLUSTER_INDEX_RELID 2
|
||||
#define PROGRESS_CLUSTER_HEAP_TUPLES_SCANNED 3
|
||||
#define PROGRESS_CLUSTER_HEAP_TUPLES_WRITTEN 4
|
||||
#define PROGRESS_CLUSTER_TOTAL_HEAP_BLKS 5
|
||||
#define PROGRESS_CLUSTER_HEAP_BLKS_SCANNED 6
|
||||
#define PROGRESS_CLUSTER_INDEX_REBUILD_COUNT 7
|
||||
|
||||
/* Phases of cluster (as dvertised via PROGRESS_CLUSTER_PHASE) */
|
||||
#define PROGRESS_CLUSTER_PHASE_SEQ_SCAN_HEAP 1
|
||||
#define PROGRESS_CLUSTER_PHASE_INDEX_SCAN_HEAP 2
|
||||
#define PROGRESS_CLUSTER_PHASE_SORT_TUPLES 3
|
||||
#define PROGRESS_CLUSTER_PHASE_WRITE_NEW_HEAP 4
|
||||
#define PROGRESS_CLUSTER_PHASE_SWAP_REL_FILES 5
|
||||
#define PROGRESS_CLUSTER_PHASE_REBUILD_INDEX 6
|
||||
#define PROGRESS_CLUSTER_PHASE_FINAL_CLEANUP 7
|
||||
|
||||
/* Commands of PROGRESS_CLUSTER */
|
||||
#define PROGRESS_CLUSTER_COMMAND_CLUSTER 1
|
||||
#define PROGRESS_CLUSTER_COMMAND_VACUUM_FULL 2
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user