Re: walsummarizer can get stuck when switching timelines

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: walsummarizer can get stuck when switching timelines
Date: 2026-07-15 08:52:38
Message-ID: CEC18F49-3FE2-4CD4-942B-7B239F86F79A@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 15 Jul 2026, at 11:28, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> Can we first rule out that this can't be a timing issue in the test case itself?

Thanks! That log points at the test, not the summarizer. On node3
it's "waiting for WAL to become available at 0/03000018", which
is before the switch, so recovery (and the summarizer) never gets there.
The pre-switch segment node3 needs never reaches node2's archive:
with archive_mode=on, segments node2 received only by
streaming aren't archived, and it's already gone by the time node2 is
promoted. Whether this bites depends on how much WAL precedes the
promotion, which can easily differ on Windows.

I can reproduce it locally by adding an extra WAL switch on node1
before promoting node2. It can probably be made deterministic either by
polling pg_stat_archiver before relying on the segment (as
025_stuck_on_old_timeline.pl does) or by setting archive_mode=always on
node2 (I would expect it to be a bit faster).

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2026-07-15 09:06:32 Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Previous Message Antonin Houska 2026-07-15 08:47:28 Re: REPACK enhancements