Re: Report index currently being vacuumed in pg_stat_progress_vacuum

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Report index currently being vacuumed in pg_stat_progress_vacuum
Date: 2026-08-14 00:47:06
Message-ID: CAA5RZ0tNgNpNcd_oLUwxtA+G7f+otTpcESE9beYetERmwPomgg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Hi,

3/ Track the leader_pid via a new progress report param (like the v1
> did upthread).

Yes, this seems like the best way. Have the workers report their leader.

> (1) and (2) will let unprivileged users take ProcArrayLock and scan
> the entire PGPROC array. (3) although it eats up a new slot in the
> progress report, gives the leader pid almost for free. I prefer (3)
> for its simplicity and without any additional risks.
>
> Adding Michael Paquier to the thread for any thoughts on this.
>
> > There is probably a larger discussion around what should and should not
> > be permission controlled in pg_stat_activity, and I could not find a
> > consistent rule. For example, we do not permission control
> application_name,
> > which is user controlled free text, yet we do permission control
> > query_id, which
> > is not permission controlled elsewhere such as pg_stat_statements. We
> probably
> > need a separate thread to clearly lay out the principles for this.
>
> The rule here seems simple. The pid or leader_pid by itself is not
> something that requires permission controls, it is what the users will
> do to get it that matters. I think this applies to all other params as
> well.
>
> Thoughts?

I agree. At least the leader_pid should not be permission controlled and we
should
be able to perform the aggregation as we do in v3- at the sql level. Other
fields like
relid, phase, etc. sit behind permission controls and should remain that
way. If there
is different opinion for those fields, that is a separate discussion.

WDYT?

--
Sami

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2026-08-14 02:12:13 Re: Row pattern recognition
Previous Message Michael Paquier 2026-08-14 00:37:34 Re: Fetch channel binding digest explicitly with OpenSSL 3.0 and later