agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Prevent walsummarizer from getting stuck at a timeline switch.
Date: Fri, 31 Jul 2026 15:57:54 +0000
Message-ID: <E1wppcQ-000000017Bb-1Eer@gemulon.postgresql.org> (raw)
Prevent walsummarizer from getting stuck at a timeline switch.
As previously coded, walsummarizer only wants to read WAL from a file
where the TimeLineID in the filename exactly matches the TimeLineID being
summarized. But in some cases, when a timeline switch occurs, the WAL file
from the old timeline is not archived, because it's never completely
filled, so the only way to obtain the contents of that last partial
segment is to read from the first segment on the new timeline. Teach
WAL summarizer to do that, and add a test case to make sure that it
works.
Reported-by: Nick Ivanov <nick.ivanov@enterprisedb.com>
Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru>
Tested-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: Thom Brown <thom@linux.com>
Discussion: http://postgr.es/m/CA+Tgmobr27GpKDZx3_ezW2+C5_g18i+jSK3sGF_cR-_ESv5N5A@mail.gmail.com
Backpatch-through: 17
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/dfb96277d7ba01d3bcb70a64b7835182ae419022
Modified Files
--------------
src/backend/postmaster/walsummarizer.c | 173 +++++++++++++++++++++++++++---
src/bin/pg_walsummary/meson.build | 1 +
src/bin/pg_walsummary/t/003_tli_switch.pl | 146 +++++++++++++++++++++++++
3 files changed, 306 insertions(+), 14 deletions(-)
view thread (4+ messages) latest in thread
Message-ID: <E1wppcQ-000000017Bb-1Eer@gemulon.postgresql.org>
Permalink: ../E1wppcQ-000000017Bb-1Eer@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wppcQ-000000017Bb-1Eer@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Prevent walsummarizer from getting stuck at a timeline switch.
In-Reply-To: <E1wppcQ-000000017Bb-1Eer@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox