| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | surya poondla <suryapoondla4(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Fix XLogFileReadAnyTLI silently applying divergent WAL from wrong timeline |
| Date: | 2026-08-21 15:39:23 |
| Message-ID: | 46DA98EE-105D-41D6-A522-001C79BACAD6@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 2 Jul 2026, at 20:59, surya poondla <suryapoondla4(at)gmail(dot)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 | Content-Type | Size |
|---|---|---|
| v3-0001-Prevent-archive-recovery-from-reading-divergent-W.patch | application/octet-stream | 14.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavlo Golub | 2026-08-21 15:42:26 | [PATCH v4] Add pg_current_vxact_id() function |
| Previous Message | Matthias van de Meent | 2026-08-21 15:36:23 | Re: Thread-safe stringToNode() / pg_strtok() |