Re: Add mode column to pg_stat_progress_vacuum

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Treat <rob@xzilla.net>
Cc: Shinya Kato <shinya11.kato@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-10-07T16:26:03Z
Lists: pgsql-hackers
On Tue, Oct 07, 2025 at 11:50:46AM -0400, Robert Treat wrote:
> On Tue, Oct 7, 2025 at 11:04 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>> I wonder if we should also add "aggressive".
> 
> I don't think so. I feel like the point of the mode is to answer "why
> is this vacuum running" not "how is it operating under the hood".

To some extent, those are tied together.  For example, a failsafe vacuum is
an anti-wraparound vacuum that skips index vacuuming, etc.  And an
anti-wraparound vacuum implies an aggressive scan, but not vice versa.
There's also a separate parameter (vacuum_freeze_table_age) that controls
when vacuum decides to perform an aggressive scan, just like there exists a
parameter for anti-wraparound vacuums (autovacuum_freeze_max_age) and
failsafe vacuums (vacuum_failsafe_age).

-- 
nathan



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.