Re: Fix pg_stat_get_backend_wait_event() for aux processes
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2026-02-05T00:21:06Z
Lists: pgsql-hackers
> 3/ > > + * pgstat_get_backend_type_by_proc_number() - > + * > + * Return the type of the backend with the specified ProcNumber. > This looks > + * directly at the BackendStatusArray, so the return value may be > out of date. > + * The only current use of this function is in > pg_signal_backend(), which is > + * inherently racy, so we don't worry too much about this. > + * > + * It is the caller's responsibility to use this wisely; at > minimum, callers > + * should ensure that procNumber is valid and perform the > required permissions > + * checks. > + * ---------- > + */ > +BackendType > +pgstat_get_backend_type_by_proc_number(ProcNumber procNumber) > > +extern BackendType pgstat_get_backend_type_by_proc_number(ProcNumber > procNumber); > > > Maybe I am missing something, but I don't see > pgstat_get_backend_type_by_proc_number > being used. Disregard this comment please. It looks like this was due to 084e42b after rebasing 0001 to test. -- Sami Imseih
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