Re: Add wait events for server logging destination writes

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: 신성준 <shinsj4653(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Kirk Wolak <wolakk(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Andreas Karlsson <andreas(at)proxel(dot)se>, Nikolay Samokhvalov <nik(at)postgres(dot)ai>
Subject: Re: Add wait events for server logging destination writes
Date: 2026-06-01 04:37:34
Message-ID: ah0MjuP8Kku69_vz@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2026-06-01 04:58:58 Re: Improve pg_stat_statements scalability
Previous Message Michael Paquier 2026-06-01 04:08:38 Re: autovacuum launcher crash: assert in pgstat_count_io_op (IOOP_EXTEND on pg_database's VM)