1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +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

@ -1879,6 +1879,13 @@ pg_stat_progress_create_index| SELECT s.pid,
d.datname,
s.relid,
(s.param7)::oid AS index_relid,
CASE s.param1
WHEN 1 THEN 'CREATE INDEX'::text
WHEN 2 THEN 'CREATE INDEX CONCURRENTLY'::text
WHEN 3 THEN 'REINDEX'::text
WHEN 4 THEN 'REINDEX CONCURRENTLY'::text
ELSE NULL::text
END AS command,
CASE s.param10
WHEN 0 THEN 'initializing'::text
WHEN 1 THEN 'waiting for writers before build'::text