Re: Add wait events for server logging destination writes

From: Nikolay Samokhvalov <nik(at)postgres(dot)ai>
To: 신성준 <shinsj4653(at)gmail(dot)com>
Cc: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Kirk Wolak <wolakk(at)gmail(dot)com>, assam258(at)gmail(dot)com, pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, jian(dot)universality(at)gmail(dot)com
Subject: Re: Add wait events for server logging destination writes
Date: 2026-09-15 03:32:22
Message-ID: CAM527d-jgvJ7U6hcesp7WzB6U8gAuXBpqE5pahB0i=Q_ktt9hw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Seongjun,

> this patch does not change anything for them either way.

I tested the extension case with stderr logging and
logging_collector=off. A small extension sets
Extension/HarnessOuterWait, calls ereport(LOG), then keeps waiting.
The observer samples only after ereport(LOG) returns:

unpatched active | Extension | HarnessOuterWait
v8 active | NULL | NULL

So v8 clears the outer event after logging returns. It is not briefly
masked; it remains lost.

I think the new logging sites should preserve the old event, or this
patch should wait for the general fix. The longjmp cleanup sites can
use a separate reset helper.

My AI harness tested v8 on master at c68cba09dd7f: cassert build,
regression, isolation and relevant TAP tests passed. SysloggerWrite
also worked as intended. I did not rerun Windows.

This looks close. I think this edge case needs one more iteration
before commit. Happy to retest.

Thanks,
Nik

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-09-15 03:45:28 Re: GIN index fast list search may become un-interruptible for long time.
Previous Message Nisha Moond 2026-09-15 03:14:49 Re: Crashes on a partition whose concurrent detach never finished