Re: Add a permission check to pg_stat_get_backend_subxact()

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
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-22 00:18:25
Message-ID: CAGRkXqRRuYSPpVi2_Ycss3QNYDLFgptX+w3yt_qPaMG+dZAOXg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Michael,

> One approach that may be saner is to store a trace of the PID in
> PgStat_Backend when a new backend connects, then compare it back with
> the existing PGPROC entry, then decide what to show based on the state
> of both.

Thanks for pointing that out. Applied.

0001 is unchanged.
Thanks,
Shihao

Attachment Content-Type Size
v6-0001-Make-per-backend-statistics-functions-respect-sta.patch application/octet-stream 15.1 KB
v6-0002-Store-the-PID-of-a-backend-in-its-statistics-entr.patch application/octet-stream 3.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Shapalov 2026-09-22 00:38:39 Re: Proposal: expose heavyweight lock wait start time in pg_stat_activity
Previous Message Michael Paquier 2026-09-22 00:16:30 Re: Redesign per-backend statistics