Re: Add wait events for server logging destination writes

From: Kirk Wolak <wolakk(at)gmail(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 신성준 <shinsj4653(at)gmail(dot)com>, Nikolay Samokhvalov <nik(at)postgres(dot)ai>, assam258(at)gmail(dot)com, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andreas Karlsson <andreas(at)proxel(dot)se>, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>
Subject: Re: Add wait events for server logging destination writes
Date: 2026-11-13 14:02:45
Message-ID: CACLU5mRjm6L6pJopC2MxWAw3=R21HNJ8rP=3=Hn-yuXQyuvr3g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 13, 2026 at 2:10 AM Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:

> Hi all,
>
> On 13 Nov 2026, Michael Paquier wrote:
> > it's just a workaround due to the fact that wait
> > events are not handled in a nested way.
>
> I support moving towards nested waits. Keeping the previous event in
> the caller's frame is the approach I had in mind. Starting with the
> logging sites seems a useful step.
>
> The patch addresses the case that concerns me: logs on a slow boot disk
> not showed up in stats.
>
> For follow-up, I'd look at WaitEventSetWait() and FileReadV(). Both
> still clear an outer event when their wait ends.
>
> Could we reuse the debug nesting check to collect inner/outer call
> sites over a check-world run and identify most useful sites that can
> be converted to nested?
>
+1

I like getting the waits a bit more accurate. It might take a few passes.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-11-13 14:12:31 Re: Add wait events for server logging destination writes
Previous Message Koshi Shibagaki (Fujitsu) 2026-11-13 14:00:45 Re: RE: Injection point: fix race condition between attach and cleanup