Re: Fix XLogFileReadAnyTLI silently applying divergent WAL from wrong timeline - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Fix XLogFileReadAnyTLI silently applying divergent WAL from wrong timeline
Date
Msg-id 46DA98EE-105D-41D6-A522-001C79BACAD6@yandex-team.ru
Whole thread
In response to Fix XLogFileReadAnyTLI silently applying divergent WAL from wrong timeline  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses RE: 035_standby_logical_decoding might fail due to FATAL message lost inside libpq
List pgsql-hackers

> On 2 Jul 2026, at 20:59, surya poondla <suryapoondla4@gmail.com> wrote:
> 
> I finally got some time to review this patch.

Hi Surya,

Thank you for the review! PFA v3.

The code now stops after trying the newest timeline eligible for the
requested segment. The comment explains why a parent copy of the
switch-point segment cannot be used as a whole even though its prefix is
valid. A DEBUG1 message makes the resulting wait explicit.

Both tests now first prove that recovery reaches the missing child
segment and refuses the available parent copy. They then publish the
correct child segment, let recovery reach the requested timeline, and
check the exact rows, including the absence of divergent parent rows.

I left the separate walreceiver state change out of v3. Maybe, I will
discuss it in a separate thread. Restart of the walreceiver itself is not
such a big problem as not reaching target timeline.

Thank you!

Best regards, Andrey Borodin.

Attachment

pgsql-hackers by date:

Previous
From: Matheus Alcantara
Date:
Subject: Re: hashjoins vs. Bloom filters (yet again)
Next
From: Bernd Reiß
Date:
Subject: Re: missing possibility to use alternative translated month names in to_char function