Re: Add a permission check to pg_stat_get_backend_subxact() - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add a permission check to pg_stat_get_backend_subxact()
Date
Msg-id arXyNYza9BwHqRp0@paquier.xyz
Whole thread
In response to Re: Add a permission check to pg_stat_get_backend_subxact()  (shihao zhong <zhong950419@gmail.com>)
Responses Re: Add a permission check to pg_stat_get_backend_subxact()
List pgsql-hackers
On Thu, Sep 24, 2026 at 11:40:01PM -0400, shihao zhong wrote:
> One more point for Michael. 0002 does not change stats_fetch_consistency
> or drop anything fetched earlier. It only checks, while the activity
> snapshot is built, that each entry takes its status and its PGPROC fields
> from the same backend. If the PID does not match, that backend has exited,
> so no xid and no subxacts is the right answer for it.

Let me doubt you here.  For one, it makes the API contract of
ProcNumberGetTransactionIds() much harder to think about.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: shihao zhong
Date:
Subject: Re: Add a permission check to pg_stat_get_backend_subxact()
Next
From: shveta malik
Date:
Subject: Re: Persist slot invalidations before publishing them