Re: FSM doesn't recover after zeroing damaged page. - Mailing list pgsql-hackers

From Kirill Reshke
Subject Re: FSM doesn't recover after zeroing damaged page.
Date
Msg-id CALdSSPjg0hBUvPASkVt799z7+JOYdcE0j_WznbxjVB0H05M+qw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi!

On Fri, 7 Feb 2025 at 05:15, Anton A. Melnikov
<a.melnikov@postgrespro.ru> wrote:
>
> Hi!

> I noticed that the updated page is not written to disk because the
> buffer where it is located is not marked dirty. Moreover MarkBufferDirtyHint(),
> which is called for modified FSM pages, seems is not suitable here,
> since as i suppose the corrupted page must be rewritten certainly, not for hint.


Could you please elaborate? FSM changes are never wal-logged, so it is
possible to read torn pages from a disk (their checksum will mismatch
with the header), so
MarkBufferDirtyHint seems to be completely fine here. I don't think
MarkBufferDirty provides something different from MarkBufferDirtyHint
in the FSM case (because FSM changed are not persistent). At the end
of the day, you just should write a page on a disk sooner or later,
and that's it.


-- 
Best regards,
Kirill Reshke



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: change on_exit_nicely_list array to the dynamic array to increase slots at run time for pg_restore
Next
From: Andres Freund
Date:
Subject: Re: pg_attribute_noreturn(), MSVC, C11