mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Report progress of REINDEX operations
This uses the same infrastructure that the CREATE INDEX progress reporting uses. Add a column to pg_stat_progress_create_index to report the OID of the index being worked on. This was not necessary for CREATE INDEX, but it's useful for REINDEX. Also edit the phase descriptions a bit to be more consistent with the source code comments. Discussion: https://www.postgresql.org/message-id/ef6a6757-c36a-9e81-123f-13b19e36b7d7%402ndquadrant.com
This commit is contained in:
@@ -53,6 +53,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 201904071
|
||||
#define CATALOG_VERSION_NO 201904072
|
||||
|
||||
#endif
|
||||
|
@@ -59,6 +59,7 @@
|
||||
|
||||
/* Progress parameters for CREATE INDEX */
|
||||
/* 3, 4 and 5 reserved for "waitfor" metrics */
|
||||
#define PROGRESS_CREATEIDX_INDEX_OID 6
|
||||
#define PROGRESS_CREATEIDX_ACCESS_METHOD_OID 8
|
||||
#define PROGRESS_CREATEIDX_PHASE 9 /* AM-agnostic phase # */
|
||||
#define PROGRESS_CREATEIDX_SUBPHASE 10 /* phase # filled by AM */
|
||||
@@ -76,6 +77,8 @@
|
||||
#define PROGRESS_CREATEIDX_PHASE_VALIDATE_SORT 5
|
||||
#define PROGRESS_CREATEIDX_PHASE_VALIDATE_TABLESCAN 6
|
||||
#define PROGRESS_CREATEIDX_PHASE_WAIT_3 7
|
||||
#define PROGRESS_CREATEIDX_PHASE_WAIT_4 8
|
||||
#define PROGRESS_CREATEIDX_PHASE_WAIT_5 9
|
||||
|
||||
/*
|
||||
* Subphases of CREATE INDEX, for index_build.
|
||||
|
Reference in New Issue
Block a user