Re: Fix pg_stat_get_backend_wait_event() for aux processes
Rahila Syed <rahilasyed90@gmail.com>
From: Rahila Syed <rahilasyed90@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2026-02-05T11:15:39Z
Lists: pgsql-hackers
Hi, > > Another thing I didn't do in this patch yet: I feel we should replace > BackendPidGetProc() with a function like "PGPROC *PidGetPGProc(pid_t)", > that would work for backends and aux processes alike. It's a common > pattern to call BackendPidGetProc() followed by AuxiliaryPidGetProc() > currently. Even for the callers that specifically want to only check > backend processes, I think it would be more natural to call > PidGetPGProc(), and then check the process type. > > +1 for the idea, do you also intend to remove AuxiliaryPidGetProc() as part of this change, given that all the occurrences of it are coupled with BackendPidGetProc() ? Thank you, Rahila Syed
Commits
-
Fix pg_stat_get_backend_wait_event() for aux processes
- 82b495cdd7ec 14.22 landed
- ebc53ca7b2ff 15.17 landed
- 2332911ae6f4 16.13 landed
- 84247333792c 17.9 landed
- 53463b4b2484 18.3 landed
- 78a5e3074b82 19 (unreleased) landed
-
doc: Mention possible ephemeral discrepancies in pg_stat_activity
- f056f75dafd0 18.0 cited
-
Show more processes in pg_stat_activity.
- fc70a4b0df38 10.0 cited