diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2019-04-07 11:30:14 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2019-04-07 12:35:29 +0200 |
commit | 03f9e5cba0ee1633af4abe734504df50af46fbd8 (patch) | |
tree | a58530a21f478fc54658768e680de91e9c20ebee /src/include/commands/progress.h | |
parent | 106f2eb664bbd38c83090becff9fcde1e9622c9c (diff) | |
download | postgresql-03f9e5cba0ee1633af4abe734504df50af46fbd8.tar.gz postgresql-03f9e5cba0ee1633af4abe734504df50af46fbd8.zip |
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
Diffstat (limited to 'src/include/commands/progress.h')
-rw-r--r-- | src/include/commands/progress.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/commands/progress.h b/src/include/commands/progress.h index f046fa13b18..37043e926d1 100644 --- a/src/include/commands/progress.h +++ b/src/include/commands/progress.h @@ -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. |