Re: Stop masking visibility information during WAL consistency checking

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Zhijie Hou <houzhijie22(at)gmail(dot)com>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>, surya poondla <suryapoondla4(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Stop masking visibility information during WAL consistency checking
Date: 2026-11-21 13:40:15
Message-ID: 4B50421C-1316-4F63-9346-E91030B6BDD5@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 21 Nov 2026, Zhijie Hou wrote:
> We could fix this by unconditionally WAL-logging the VM page there,
> which advances pd_lsn as well.

Could we work out all the conditions under which redo must reproduce
each field, and keep the consistency check enabled whenever they hold?

I'd analyze PD_ALL_VISIBLE and the VM bitmap separately. Besides
checksums, wal_log_hints and full_page_writes, we need to consider LSN
ordering and the page lifecycle: truncation, unlink/recreation and
zero-extension, including whether the current record initializes the
page.

Decisions based on configuration should use the WAL writer's settings,
including changes recorded in the replayed WAL. We could then mask only
the fields whose prerequisites are not satisfied, or skip a comparison
when a missing or new page cannot be reconstructed.

Thank you!

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2026-11-21 13:42:48 Re: Table AM callback for logical decoding support (REPACK CONCURRENTLY)
Previous Message Amit Kapila 2026-11-21 13:05:47 Re: Detect mismatched subscription and replication slot properties