I propose to add a column "command" to pg_stat_progress_create_index.
The sibling view pg_stat_progress_cluster already contains such a
column. This can help distinguish which command is running and thus
which phases to expect. It seems reasonable to keep these views
consistent, too. (They are both new in PG12.) Patch attached.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services