Re: [BUG] pg_rewind: file sync bypass and findLastCheckpoint boundary crash

From: surya poondla <suryapoondla4(at)gmail(dot)com>
To: Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [BUG] pg_rewind: file sync bypass and findLastCheckpoint boundary crash
Date: 2026-11-27 20:41:14
Message-ID: CAOVWO5rUgERHmKT2A-aByfmVyuvHr7AyEqs5zo4Uiznvjckeqg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Srinath,

I tested this on master, and I don't think the scenario you describe is a
bug. After "no rewind required", I started the old primary with
standby.signal and primary_conninfo. It fetched 00000002.history from the
new primary, switched to timeline 2 and streamed WAL, its data matched the
new primary.

The things you list as not being synced aren't needed here:
- A standby gets the history file from its primary or the archive.
- Recovery doesn't depend on the TLI in pg_control, since the target was
shut down cleanly and its WAL is a prefix of the new timeline.
- The docs describe copying configuration files as something you may need
to fix up after a rewind, not as a guarantee, and a standby doesn't get the
primary's ALTER SYSTEM settings anyway.
- -R is already handled on the early-exit path.

So I don't think the early exit should be removed, and bug 2 can only
happen once it is.

Regards,
Surya Poondla

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-11-27 20:42:36 Re: Set 1s WaitLatch timeout if standby limit has expired in ResolveRecoveryConflictWithBufferPin
Previous Message Álvaro Herrera 2026-11-27 20:10:02 logical decoding: removing change_useless_for_repack()