agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Prevent walsummarizer from getting stuck at a timeline switch.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent walsummarizer from getting stuck at a timeline switch.
@ 2026-07-31 15:57  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Robert Haas @ 2026-07-31 15:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Prevent walsummarizer from getting stuck at a timeline switch.
@ 2026-07-31 15:57  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Robert Haas @ 2026-07-31 15:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/18f0de6b885a017dfba620e0b9a5f42a1bc16d25

Modified Files
--------------
src/backend/postmaster/walsummarizer.c    | 173 +++++++++++++++++++++++++++---
src/bin/pg_walsummary/meson.build         |   1 +
src/bin/pg_walsummary/t/003_tli_switch.pl | 149 +++++++++++++++++++++++++
3 files changed, 309 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Prevent walsummarizer from getting stuck at a timeline switch.
@ 2026-07-31 15:57  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Robert Haas @ 2026-07-31 15:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/499d9eabb5698ff6091b5a186acd7d05cf9d4c2b

Modified Files
--------------
src/backend/postmaster/walsummarizer.c    | 173 +++++++++++++++++++++++++++---
src/bin/pg_walsummary/meson.build         |   1 +
src/bin/pg_walsummary/t/003_tli_switch.pl | 149 +++++++++++++++++++++++++
3 files changed, 309 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Prevent walsummarizer from getting stuck at a timeline switch.
@ 2026-07-31 15:57  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Robert Haas @ 2026-07-31 15:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e8a0c1b02c3d8b96cd5febacab8aaba4869431f

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(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2026-07-31 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31 15:57 pgsql: Prevent walsummarizer from getting stuck at a timeline switch. Robert Haas <rhaas@postgresql.org>
2026-07-31 15:57 pgsql: Prevent walsummarizer from getting stuck at a timeline switch. Robert Haas <rhaas@postgresql.org>
2026-07-31 15:57 pgsql: Prevent walsummarizer from getting stuck at a timeline switch. Robert Haas <rhaas@postgresql.org>
2026-07-31 15:57 pgsql: Prevent walsummarizer from getting stuck at a timeline switch. Robert Haas <rhaas@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox