1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Add command column to pg_stat_progress_create_index

This allows determining which command is running, similar to
pg_stat_progress_cluster.

Discussion: https://www.postgresql.org/message-id/flat/f0e56b3b-74b7-6cbc-e207-a5ed6bee18dc%402ndquadrant.com
This commit is contained in:
Peter Eisentraut
2019-06-04 09:16:02 +02:00
parent 041a2642e5
commit c880096dc1
7 changed files with 40 additions and 2 deletions

View File

@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
#define CATALOG_VERSION_NO 201906031
#define CATALOG_VERSION_NO 201906041
#endif

View File

@@ -59,6 +59,7 @@
/* Progress parameters for CREATE INDEX */
/* 3, 4 and 5 reserved for "waitfor" metrics */
#define PROGRESS_CREATEIDX_COMMAND 0
#define PROGRESS_CREATEIDX_INDEX_OID 6
#define PROGRESS_CREATEIDX_ACCESS_METHOD_OID 8
#define PROGRESS_CREATEIDX_PHASE 9 /* AM-agnostic phase # */
@@ -86,6 +87,12 @@
#define PROGRESS_CREATEIDX_SUBPHASE_INITIALIZE 1
/* Additional phases are defined by each AM */
/* Commands of PROGRESS_CREATEIDX */
#define PROGRESS_CREATEIDX_COMMAND_CREATE 1
#define PROGRESS_CREATEIDX_COMMAND_CREATE_CONCURRENTLY 2
#define PROGRESS_CREATEIDX_COMMAND_REINDEX 3
#define PROGRESS_CREATEIDX_COMMAND_REINDEX_CONCURRENTLY 4
/* Lock holder wait counts */
#define PROGRESS_WAITFOR_TOTAL 3
#define PROGRESS_WAITFOR_DONE 4