| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: walsummarizer can get stuck when switching timelines |
| Date: | 2026-07-16 06:05:25 |
| Message-ID: | B58164E1-190A-4C9E-9509-1B0A8BED72EC@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 16 Jul 2026, at 01:18, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
>
> understand Andrey's probable desire to have me review his patch on
> that thread, but I think whatever is going on there is only
> tangentially related to this problem.
Of course I'd like that fix committed too :) But that's not why I'm raising it here.
+# The reason for the problem is that when a new primary is promoted, the
+# partial file that ends the old timeline is renamed, giving it a ".partial"
+# suffix, and is not archived. That's not a problem for recovery, because
+# the bytes that appear at the start of that segment will be copied into the
+# first segment on the new timeline, and recovery will read them from there
+# and work just fine.
That only holds when the new timeline's segment is already available. If it isn't,
XLogFileReadAnyTLI() falls back to the ancestor's segment and, past the switch point,
hands recovery the old timeline's divergent WAL. It's the mirror, on the recovery
side, of what your patch fixes for the summarizer.
I'm not asking you to fix XLogFileReadAnyTLI() here. I just don't think the new
comment should claim recovery is unaffected.
Best regards, Andrey Borodin.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ajin Cherian | 2026-07-16 06:06:23 | Re: [PATCH] Preserve replication origin OIDs in pg_upgrade |
| Previous Message | Siddharth Kothari | 2026-07-16 06:03:36 | Re: [PATCH] Add RetrieveInstrumentation hook for CustomScan providers |