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

From Andrey Borodin
Subject Re: VM corruption on standby
Date
Msg-id DD626328-835F-4629-9420-C7CE3ABE8A26@yandex-team.ru
Whole thread Raw
In response to Re: VM corruption on standby  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: VM corruption on standby
List pgsql-hackers

> On 9 Aug 2025, at 18:28, Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>
> Also I investigated that in a moment of kill -9 checkpointer flushes heap page to disk despite content lock. I
haven'tfound who released content lock though. 

I've written this message and understood: its LWLockReleaseAll().

0. checkpointer is going to flush a heap buffer but waits on content lock
1. client is resetting PD_ALL_VISIBLE from page
2. postmaster is killed and command client to go down
3. client calls LWLockReleaseAll() at ProcKill() (?)
4. checkpointer flushes buffer with reset PG_ALL_VISIBLE that is not WAL-logged to standby
5. subsequent deletes do not log resetting this bit
6. deleted data is observable on standby with IndexOnlyScan

Any idea how to fix this?


Best regards, Andrey Borodin.




pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: VM corruption on standby
Next
From: Tom Lane
Date:
Subject: Re: Making type Datum be 8 bytes everywhere