Re: Add a permission check to pg_stat_get_backend_subxact()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add a permission check to pg_stat_get_backend_subxact()
Date: 2026-09-25 04:01:57
Message-ID: arXyNYza9BwHqRp0@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-09-25 04:08:27 Re: Persist slot invalidations before publishing them
Previous Message shihao zhong 2026-09-25 03:40:01 Re: Add a permission check to pg_stat_get_backend_subxact()