Re: Add mode column to pg_stat_progress_vacuum
Shinya Kato <shinya11.kato@gmail.com>
From: Shinya Kato <shinya11.kato@gmail.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: maciek@sakrejda.org, Masahiko Sawada <sawada.mshk@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>, Robert Treat <rob@xzilla.net>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-20T06:23:32Z
Lists: pgsql-hackers
Attachments
- v7-0001-Add-mode-and-triggered_by-columns-to-pg_stat_prog.patch (application/octet-stream)
- v7-0002-Add-triggered_by-column-to-pg_stat_progress_analy.patch (application/octet-stream)
On Thu, Nov 20, 2025 at 10:34 AM Sami Imseih <samimseih@gmail.com> wrote: > > Hi, > > The patch looks overall good to me. I have a few comments: Thank you for your review! > 1/ I believe It is possible for the mode to flip to "failsafe" during the > operation since lazy_check_wraparound_failsafe() is checked in-flight. > I think this should be mentioned in the "mode" section of the documentation > in the "failsafe" description. +1, I've added the below statement to the v7 patch. --- The vacuum may start in this mode or switch to it while running; the value of the mode column may transition from another mode to failsafe during the operation. --- > 2/ It feels odd that we do not have parity of the "mode" column in > pg_stat_progress_analyze. Should we add a "mode" column > there also that shows if the analyze was triggered_by "manual" or > "autovacuum"? An autovacuum in a relation can trigger both > a vacuum and an analyze, and a VACUUM(ANALYZE) will > also do both. Thank you for your suggestions. I've created another patch v7-0002 adding a "triggered_by" column to pg_stat_progress_analyze. -- Best regards, Shinya Kato NTT OSS Center