Taking the above feedback, I modified the patches
and I believe this approach should be acceptable.
For now, I also reduced the scope to only exposing
Indexes_total and indexes_completed in
pg_stat_progress_vacuum. I will create a new CF entry
for the new view pg_stat_progress_vacuum_index.
V10-0001: This patch adds a callback to ParallelContext
that could be called by the leader in vacuumparallel.c
and more importantly while the leader is waiting
for the parallel workers to complete inside.
This ensures that the leader is continuously polling and
reporting completed indexes for the life of the PARALLEL
VACUUM. This covers cases where the leader completes
vacuuming before the workers complete.
V10-0002: This implements the indexes_total and
indexes_completed columns in pg_stat_progress_vacuum.
This work is now tracked in the next commitfest:
https://commitfest.postgresql.org/38/3617/
Regards,
Sami Imseih
Amazon Web Services