Re: Fix pg_stat_get_backend_wait_event() for aux processes
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Sami Imseih <samimseih@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Robert Haas <robertmhaas@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2026-02-05T16:58:41Z
Lists: pgsql-hackers
Hi, On 2026-02-04 17:48:57 -0600, Sami Imseih wrote: > > > > There is also a discussion [0] about wait event/activity field > > inconsistency > > with pg_stat_activity with a repro in [1]. > > > The repro I was referring to in [1] is actually > https://www.postgresql.org/message-id/ab1c0a7d-e789-5ef5-1180-42708ac6fe2d%40postgrespro.ru That is inherent. The wait event is updated in an unsynchronized fashion. As noted in that thread. Making it synchronized (via st_changecount) would make wait event overhead vastly higher. Greetings, Andres Freund
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