Re: Add index scan progress to pg_stat_progress_vacuum
Sami Imseih <simseih@amazon.com>
From: "Imseih (AWS), Sami" <simseih@amazon.com>
To: Robert Haas <robertmhaas@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, "Bossart, Nathan" <bossartn@amazon.com>, "Andres
Freund" <andres@anarazel.de>
Cc: Peter Geoghegan <pg@bowt.ie>, Justin Pryzby <pryzby@telsasoft.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-04-14T01:32:54Z
Lists: pgsql-hackers
Attachments
- v10-0001-Add-progress-reporting-callback-to-ParallelConte.patch (application/octet-stream) patch v10-0001
- v10-0002-Show-progress-for-index-vacuums.patch (application/octet-stream) patch v10-0002
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
Commits
-
Report index vacuum progress.
- 46ebdfe164c6 17.0 landed
-
Add new parallel message type to progress reporting.
- f1889729dd3a 17.0 landed
-
Remove MaxBackends variable in favor of GetMaxBackends() function.
- aa64f23b0292 15.0 cited