Re: Can we change pg_rewind used without wal_log_hints and data_checksums

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: lchch1990(at)sina(dot)cn
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Can we change pg_rewind used without wal_log_hints and data_checksums
Date: 2026-01-15 01:57:59
Message-ID: aWhJp2UdO06MLTXH@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 15, 2026 at 09:47:39AM +0800, lchch1990(at)sina(dot)cn wrote:
> I am thinking about why pg_rewind need wal_log_hints or data_checksums which significantly
> limits its usability. I research somewhere can can only find it's for against data
> corruption in code comment.

Hint bints can be set on a page, and we *have to* WAL log these pages
so as pg_rewind can track the modified blocks, or we would corrupt a
data folder after a rewind. See around this thread about the original
description of the issue:
https://www.postgresql.org/message-id/519E5493.5060800@vmware.com

> Here i want to introduce a way to solve the case above:
> We need record all transaction ID commited after diverge record and research more wal
> before diverge record, we need to find a start lsn(lsn_s) which older than all the
> transactions. And we should read from lsn_s to diverge lsn to collect influenced pages
> by the transactions. So we can copy them at the rewind phase.

How is a method based on the tracking of transaction IDs and the
modified blocks not going to be more costly than the current method
where we are able to track the modified blocks directly in the WAL
records?
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message lchch1990 2026-01-15 02:11:21 回复:Re: Can we change pg_rewind used without wal_log_hints and data_checksums
Previous Message Tatsuro Yamada 2026-01-15 01:48:43 Re: [PATCH] psql: add \dcs to list all constraints