Re: Add mode column to pg_stat_progress_vacuum

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, Robert Treat <rob(at)xzilla(dot)net>, maciek(at)sakrejda(dot)org, Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add mode column to pg_stat_progress_vacuum
Date: 2025-12-04 00:14:31
Message-ID: CAD21AoC8k9kP9zdhwK91z9SFt5E1-J+O6Oq_zpDwnoQ4J4gJ=Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 24, 2025 at 6:06 PM Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> wrote:
>
> On Tue, Nov 25, 2025 at 8:13 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > > What about “started_by” ? it’s unambiguous and consistent with other columns
> > > like “query_start” in pg_stat_activity.
> >
> > "started_by" sounds reasonable to me.
>
> Thanks all. I've updated the patches to use "started_by" and replaced
> remaining uses of "triggered" with "started".

Thank you for updating the patches!

I've attached a small change to simplify the 0001 patch. Please review it.

For the 0002 patch adding "started_by" column to
pg_stat_progress_analyze system view, while we can easily check that
the analyze operation reported in pg_stat_progress_analyze is started
manually or by autovacuum worker by joining it to pg_stat_activity on
the pid column, the proposed column would help users to check it even
easier. So +1.

Here are a few comments:

+ <listitem>
+ <para>
+ <literal>manual</literal>: The analyze was started by an explicit

For consistency with "started_by" in pg_stat_progress_vacuum, I think
it's better to start with "The operation was started by".

---
+ <command>ANALYZE</command> or <command>VACUUM (ANALYZE)</command>
+ command.

How about using "... or VACUUM with the ANALYZE option"?

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
fix_masahiko_v8.patch application/octet-stream 1.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-12-04 00:32:03 Re: BUG #19095: Test if function exit() is used fail when linked static
Previous Message Zsolt Parragi 2025-12-03 23:38:58 Re: Proposal: Add a callback data parameter to GetNamedDSMSegment