Re: Fix pg_stat_get_backend_wait_event() for aux processes - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Fix pg_stat_get_backend_wait_event() for aux processes
Date
Msg-id 7ik7bb7vujldmeq2lfonoqzdmnmfwejr643kdjhfqdejhroh7v@dd3oilvh5yg2
Whole thread Raw
In response to Re: Fix pg_stat_get_backend_wait_event() for aux processes  (Sami Imseih <samimseih@gmail.com>)
Responses Re: Fix pg_stat_get_backend_wait_event() for aux processes
List 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



pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: Don't synchronously wait for already-in-progress IO in read stream
Next
From: Andrew Dunstan
Date:
Subject: Re: FileFallocate misbehaving on XFS