Re: VM corruption on standby - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: VM corruption on standby
Date
Msg-id CA+hUKGLZNMYWj0r5Cda7gBPgJ3wR5wQwvKe9D2DxhVa3thT9zA@mail.gmail.com
Whole thread Raw
In response to Re: VM corruption on standby  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: VM corruption on standby
Re: VM corruption on standby
List pgsql-hackers
On Thu, Sep 11, 2025 at 12:00 AM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
> > On 10 Sep 2025, at 15:25, Alexander Korotkov <aekorotkov@gmail.com> wrote:
> >  I believe we need some
> > general solution.  We might have a special kind of condition variable,
> > a critical section condition variable, where both waiting and
> > signaling must be invoked only in a critical section.  However, I dig
> > into our Latch and WaitEventSet, it seems there are too many
> > assumptions about postmaster death.  So, a critical section condition
> > variable probably should be implemented on top of semaphore.  Any
> > thoughts?
>
> We want Latch\WaitEventSet, but for critical section. Is it easier to implement from scratch (from semaphores), or is
iteasier to fix and maintain existing Latch\WaitEventSet? 

FWIW I'm working on a patch set that kills all backends without
releasing any locks when the postmaster exists.  Then CVs and other
latch-based stuff should be safe in this context.  Work was
interrupted by a vacation but I hope to post something in the nexts
couple of days, over on that other thread I started...



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: index prefetching
Next
From: Michael Paquier
Date:
Subject: Re: Incorrect logic in XLogNeedsFlush()