From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
---|---|
To: | Aleksander Alekseev <aleksander(at)tigerdata(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Melanie Plageman <melanieplageman(at)gmail(dot)com> |
Subject: | Re: VM corruption on standby |
Date: | 2025-08-10 05:45:15 |
Message-ID: | CALdSSPg6QRVouTT0wLZ4bZb=P4Aj6tNrCdcspHHv6KShOCfo6A@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 10 Aug 2025 at 01:55, Aleksander Alekseev
<aleksander(at)tigerdata(dot)com> wrote:
> For this reason we have PageHeaderData.pd_lsn for instance - to make sure
> pages are evicted only *after* the record that changed it is written
> to disk (because WAL records can't be applied to pages from the
> future).
We don't bump the LSN of the heap page when setting the visibility
map bit.
> I guess the intent here could be to do an optimization of some sort
> but the facts that 1. the instance can be killed at any time and 2.
> there might be replicas - were not considered.
> IMHO: logging the changes first, then allowing to evict the page.
Clearing the vm before the logging changes was intentional [0].
So I assume we should not change the approach, but rather just tweak
things a bit to make the whole thing work.
[0] https://www.postgresql.org/message-id/BANLkTimuLk4RHXSQHEEiYGbxiXp2mh5KCA%40mail.gmail.com
--
Best regards,
Kirill Reshke
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Borodin | 2025-08-10 06:56:28 | Re: VM corruption on standby |
Previous Message | Noah Misch | 2025-08-09 22:23:38 | Re: A few patches to clarify snapshot management |