Re: Add mode column to pg_stat_progress_vacuum

Sami Imseih <samimseih@gmail.com>

From: Sami Imseih <samimseih@gmail.com>
To: maciek@sakrejda.org
Cc: Shinya Kato <shinya11.kato@gmail.com>, 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-20T01:34:19Z
Lists: pgsql-hackers
Hi,

The patch looks overall good to me. I have a few comments:

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.

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.

--
Sami Imseih
Amazon Web Services (AWS)



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add started_by column to pg_stat_progress_analyze view.

  2. Add mode and started_by columns to pg_stat_progress_vacuum view.