public inbox for [email protected]  
help / color / mirror / Atom feed
From: [email protected]
To: Laurenz Albe <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Re: Can we change pg_rewind used without wal_log_hints and data_checksums
Date: Thu, 15 Jan 2026 14:14:27 +0800
Message-ID: <[email protected]> (raw)

>See https://postgr.es/m/CA%2BTgmoY4j%2Bp7JY69ry8GpOSMMdZNYqU6dtiONPrcxaVG%2BSPByg%40mail.gmail.com
>In more detail:
>1. there is a transaction open on the primary server (server A)
>2. the transaction inserts a row
>3. a checkpoint happens
>4. the transaction commits
>5. the session reads the row it just inserted, which sets hint bits on the row
>that mark it as generally visible
>Now the standby (server B) promoted between steps 3 and 4, which means that on server B
>(the new primary), the transaction didn't commit and the row is invisible.
>Now if we run pg_rewind on server A, it examines the local WAL to find all the blocks
>that were modified after the last common checkpoint (which happened in step 3 above).
>If neither wal_log_hints = on nor checksums are enabled (which effectively forces
>WAL-logging hint bit changes), there is no track of step 5 in the WAL, and pg_rewind
>fails to copy that block from server B.  The consequence is that after pg_rewind, the
>row is *still* visible on server A because of the hint bits.  That is data corruption.
>Therefore, the requirement cannot be relaxed.

Yes I known the step and I have check the mail link. As described in the top mail we can find some way to solve the problem so that pg_rewind can run without wal_log_hints and data_checksums. 

Currently pg_rewind search wal start at checkpoint lsn or redo lsn, I mean to search more wal to cover whole releated transactions so any releated pages with copyed, and we never warried about hint bits issue. 

Anyway, I wish my mail in right format. Because my last mail reply to Michael out of order and  miss from this thread. 
---Movead Li



view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Can we change pg_rewind used without wal_log_hints and data_checksums
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox