Re: Add wait events for server logging destination writes

From: 신성준 <shinsj4653(at)gmail(dot)com>
To: assam258(at)gmail(dot)com
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Kirk Wolak <wolakk(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, nik(at)postgres(dot)ai
Subject: Re: Add wait events for server logging destination writes
Date: 2026-06-30 17:02:19
Message-ID: CACdN0M4fzaZ1YyKDDWchKjb5TRhDU5FqKfyT1RO-YfnDB7YQ_g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Henson,

Thanks for the review, and for tracing through
pgstat_report_wait_start()/end() first -- once the helpers are just a
single store, placement is the only thing left to check, and thanks for
going through all four events against their descriptions.

> the comment you plan to add at the wrapped sites in v5 looks right
> [...] it belongs in a separate change rather than this patch.

Agreed. v5 adds that comment and leaves any general depth-counter
handling out.

v5 folds in the review:

- a short comment at each wrapped site noting the single-slot
behavior;
- Andrey's commit-message point that the real blocking call is
write_syslogger_file() in the syslogger (no PGPROC, not in
pg_stat_activity), so the backend-side SysloggerWrite is where the
stall shows up -- now in the 0001 commit message and a comment on
write_pipe_chunks().

No functional change from v4.

I'd said I'd hold v5 for platform testing, but since the review has
landed I'd rather post it than sit on the thread. Testing is still
welcome, especially the Windows EventlogWrite path -- cfbot confirms it
builds, but I can't exercise the runtime event-log write here. I'll fold
anything that turns up into a follow-up.

v5-0001 - portable part (SysloggerWrite, StderrWrite, SyslogWrite)
v5-0002 - Windows part (WriteConsoleW plus EventlogWrite)

Applies on current master; builds clean under Autoconf and Meson.

Thanks again,
Seongjun Shin

Attachment Content-Type Size
v5-0001-Add-wait-events-for-server-logging-destination-wr.patch application/octet-stream 6.4 KB
v5-0002-Add-wait-events-for-Windows-specific-logging-outp.patch application/octet-stream 3.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-06-30 17:21:07 Tepid: selective index updates for heap relations
Previous Message Tomas Vondra 2026-06-30 17:00:12 Re: occasional ECPG failures on dikkop (FreeBSD)