| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
| 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 12:19:50 |
| Message-ID: | CA+TgmoaX-Xm2LpZtqm+PxYPa_oJRmagNvZ_i+g1Yjbcdryibeg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Jul 16, 2026 at 2:05 AM Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
> 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.
In the scenario tested by this test case, recovery works fine. Without
the patch, node3 follows the timeline switch from TLI 1 to TLI 2 and
continues recovery thereafter without a problem. Only WAL
summarization gets stuck. Maybe I need to go read your thread to
figure out why you think these are the same problem, but based on what
the test case does, I feel like they are different problems.
--
Robert Haas
EDB: http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2026-07-16 12:27:46 | Re: [PATCH] Rewrite undirected edge patterns in GRAPH_TABLE using UNION ALL |
| Previous Message | Daniel Gustafsson | 2026-07-16 12:16:14 | Re: PGLZ Compression Optimization |