From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Cc: | Kirill Reshke <reshkekirill(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Melanie Plageman <melanieplageman(at)gmail(dot)com> |
Subject: | Re: VM corruption on standby |
Date: | 2025-09-10 11:59:56 |
Message-ID: | 28F7B243-A008-4C74-B22A-367A33DFBF01@yandex-team.ru |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 10 Sep 2025, at 15:25, Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
>
> I think the approach #2 is more appropriate for bc22dc0e0d, because in
> the critical section we only wait for other processes also in the
> critical section (so, there is no risk they will exit immediately
> after postmaster death making us stuck). I've implemented a patch,
> where waiting on conditional variable is replaced with LWLock-style
> waiting on semaphore. However, custom waiting code just for
> AdvanceXLInsertBuffer() doesn't look good.
Well, at least I'd like to see corruption-free solution for injection point wait too.
> 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 it easier to fix and maintain existing Latch\WaitEventSet?
Best regards, Andrey Borodin.
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2025-09-10 12:06:41 | Re: Proposal: Conflict log history table for Logical Replication |
Previous Message | Chao Li | 2025-09-10 11:54:08 | Re: GB18030-2022 Support in PostgreSQL |