Re: Add wait events for server logging destination writes - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add wait events for server logging destination writes
Date
Msg-id ah0MjuP8Kku69_vz@paquier.xyz
Whole thread
In response to Re: Add wait events for server logging destination writes  (신성준 <shinsj4653@gmail.com>)
List pgsql-hackers
On Sun, May 31, 2026 at 07:42:41PM +0900, 신성준 wrote:
> cfbot caught a build failure on v1, in the SanityCheck task on Linux
> and Windows: elog.c uses pgstat_report_wait_start()/end() and the
> WAIT_EVENT_* constants but didn't include utils/wait_event.h. It only
> built here because of an accidental transitive include on my machine;
> on the CI images the declarations weren't visible.
>
> v2 fixes that by adding the missing #include "utils/wait_event.h" to
> elog.c, folded into 0001 so that patch builds on its own. No other
> changes; the wait events and the reported write paths are the same as
> in v1.
>
> v2-0001 adds the two events and covers the write(2) paths.
> v2-0002 covers the Windows WriteConsoleW() path, split out as before.
>
> Applies cleanly on current master; full build passes locally.

Hmm.  Usually we split the event numbers so as there is one for each
code path, but here we are just dealing with the same routine that
sends chunks.  Using the same numbers seem fine by me.

If others have any thoughts or comments, feel free.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: autovacuum launcher crash: assert in pgstat_count_io_op (IOOP_EXTEND on pg_database's VM)
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Improve pg_stat_statements scalability