| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> | 
|---|---|
| To: | "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru> | 
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: FSM doesn't recover after zeroing damaged page. | 
| Date: | 2025-03-10 13:56:44 | 
| Message-ID: | CALdSSPjg0hBUvPASkVt799z7+JOYdcE0j_WznbxjVB0H05M+qw@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Hi!
On Fri, 7 Feb 2025 at 05:15, Anton A. Melnikov
<a(dot)melnikov(at)postgrespro(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2025-03-10 13:58:57 | Re: pg_attribute_noreturn(), MSVC, C11 | 
| Previous Message | Tom Lane | 2025-03-10 13:43:08 | Re: change on_exit_nicely_list array to the dynamic array to increase slots at run time for pg_restore |