Re: walsummarizer can get stuck when switching timelines

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, x4mmm(at)yandex-team(dot)ru, 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 13:45:05
Message-ID: CA+TgmoZwZ8mgysY_yTP-s3U5VtfqJS9d4JVKBOXvshmVvC-1vQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 16, 2026 at 8:59 AM Thom Brown <thom(at)linux(dot)com> wrote:
> Well if we run pg_switch_wal(), we're effectively closing the current
> segment. CHECKPOINT then emits its WAL after the switch. If the
> summarizer needs a CHECKPOINT_REDO record in the segment being
> archived, it would already be too late.

OK, I think this is where we're seeing things differently. The
summarizer doesn't need a CHECKPOINT_REDO record in the segment being
archived. Rather, we need a CHECKPOINT_REDO record somewhere after the
WAL that we want summarized. In this case, the WAL we want summarized
is generated by the pg_switch_wal() call.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ayoub.kazar 2026-07-16 13:46:00 Re: [PATCH] Rewrite undirected edge patterns in GRAPH_TABLE using UNION ALL
Previous Message Ayush Tiwari 2026-07-16 13:41:01 Re: Show hashed SAOP decision in EXPLAIN