Re: Add index scan progress to pg_stat_progress_vacuum
Sami Imseih <simseih@amazon.com>
From: "Imseih (AWS), Sami" <simseih@amazon.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, "Bossart, Nathan" <bossartn@amazon.com>, Andres Freund <andres@anarazel.de>, Peter Geoghegan <pg@bowt.ie>, Justin Pryzby <pryzby@telsasoft.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-11-02T16:52:19Z
Lists: pgsql-hackers
Attachments
- v13-0001--Show-progress-for-index-vacuums.patch (application/octet-stream) patch v13-0001
- v1-0001-Function-to-return-currently-vacuumed-or-cleaned-ind.patch (application/octet-stream) patch v1-0001
Attached is v13-0001--Show-progress-for-index-vacuums.patch which addresses the latest comments. The main changes are: 1/ Call the parallel_vacuum_progress_report inside the AMs rather than vacuum_delay_point. 2/ A Boolean when set to True in vacuumparallel.c will be used to determine if calling parallel_vacuum_progress_report is necessary. 3/ Removed global varilable from vacuumparallel.c 4/ Went back to calling parallel_vacuum_progress_report inside WaitForParallelWorkersToFinish to cover the case when a leader is waiting for parallel workers to finish. 5/ I did not see a need to only report progress after 1GB as it's a fairly cheap call to update progress. 6/ v1-0001-Function-to-return-currently-vacuumed-or-cleaned-ind.patch is a separate patch for exposing the index relid being vacuumed by a backend. Thanks Sami Imseih Amazon Web Services (AWS)
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