pg_stat_progress_vacuum was added in PostgreSQL 9.6.
pg_stat_progress_vacuum will contain one row for each current vacuum operation, which will be updated as the operation progresses. The current phase is reported in the
phase field and will be one of the following values:
cleaning up indexes
performing final cleanup
For more details on each phase, see the table VACUUM Phases in the PostgreSQL documentation.
VACUUM FULL progress is reported via the
Definition by PostgreSQL version
postgres=# SELECT * FROM pg_stat_progress_vacuum; -[ RECORD 1 ]------+-------------- pid | 5270 datid | 16389 datname | appdb relid | 16861 phase | scanning heap heap_blks_total | 162719 heap_blks_scanned | 100350 heap_blks_vacuumed | 0 index_vacuum_count | 0 max_dead_tuples | 11184810 num_dead_tuples | 0