The following bug has been logged on the website:
Bug reference: 16818
Logged by: Matthias van de Meent
Email address: boekewurm+postgres@gmail.com
PostgreSQL version: 12.5
Operating system: Debian Stretch (9.13)
Description:
This may be considered a nitpick, but:
The progress reprorting for `ALTER TABLE test ADD UNIQUE (col)` is in
`pg_stat_progress_create_index`. As it indeed creates an index, that is not
too unexpected, but the `command` column of that view reports `CREATE
INDEX`, and _that_ is somewhat unexpected. A reasonable expectation would be
`ALTER TABLE ADD CONSTRAINT` or comparable.
The only discussion regarding `ALTER TABLE` in index progress reporting
seems to have been in the original thread[0], but that was about potentially
thrashing callers' progress reporting status/values, and less about the
command name of this backend state.
[0]
https://www.postgresql.org/message-id/flat/20190329150828.s2bu4zckuxnceo6u%40alap3.anarazel.de