On Thu, Sep 10, 2026 at 05:47:36PM +0200, Jim Jones wrote:
> On 08/09/2026 02:33, shihao zhong wrote:
> pg_stat_get_backend_wal, pg_stat_get_backend_io, and
> pg_stat_get_backend_lock also lack this check. Out of scope here, but
> perhaps worth a followup patch?

Hmm, yeah.  You have a consistency point here.  None of these stats
are critical in any way, but cleaning up all that on HEAD shoulds like
a good thing to do, while we are on it.  Let's group all that in a
single patch.  All these functions treat similar backend-level stats.

> I believe the tests should also cover a non-superuser with explicit
> pg_read_all_stats permission (see 0002 attached)

Yep.  Let's make that also cheaper: one role for all of the functions.

> The C tuple descriptor still says "subxact_overflow" -- most likely the
> source of the confusion.
> 
> TupleDescInitEntry(tupdesc, (AttrNumber) 2, "subxact_overflow",
>                  BOOLOID, -1, 0);

Ahah, nice catch.  The value that primes (reported back to the user)
is not the one set in the TupleDesc but the one defined in pg_proc.dat.

Could you group all your findings in a single patch?  The doc entry
needs to be at least backpatched, mentioning "overflow" instead of
"overflowed" is not correct.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to