public inbox for [email protected]
help / color / mirror / Atom feedFrom: [email protected]
To: pgsql-hackers <[email protected]>
Subject: Can we change pg_rewind used without wal_log_hints and data_checksums
Date: Thu, 15 Jan 2026 09:47:39 +0800
Message-ID: <[email protected]> (raw)
hi hackers,
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.
And i come up a case which may need depend on the page consistence after do pg_rewind:
1. We have primary A and standby B.
2. We have a transaction xact1 currently and xact1 modify some pages.
3. Do a checkpoint on A
4. standby B promote
5. xact1 committed on and do a query on all data modified by xact1
6. do pg_rewind on A
If on no page consistence mode, and hack pg_rewind code to force a rewind, then we
may see xact1 on A and can not see xact1 on B. And it's cause unconsistence.
Now I tell myself ,pg_rewind may can not handle this case so we must set wal_log_hints
on to avoid the case. If so we can modify pg_rewind to met this case. If not so, I want
to known the reason or some mail thread discuss that? Thanks.
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.
Best Regards,Movead Li
view thread (4+ messages) latest in thread
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]
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