Re: Add wait events for server logging destination writes

From: Andres Freund <andres(at)anarazel(dot)de>
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>, Kirk Wolak <wolakk(at)gmail(dot)com>, 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:12:31
Message-ID: lmjd2y7t53luqih6y72lzex3wks56i2fwt3stuateoosuirarc@cc4zme4v3uya
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-11-13 12:10:39 +0500, Andrey Borodin wrote:
> 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.

I, however, vehemently oppose anything in that direction. You're not waiting
for something while waiting for something else. If there are places where
wait events clear an exising wait event, that code needs to be fixed.

Wait events are for reporting waits, not profiling, not general event tracing
or whatnot. They won't be good at any other such task. Stop trying to make
them into something else.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Kirk Wolak 2026-11-13 14:02:45 Re: Add wait events for server logging destination writes