Re: walsummarizer can get stuck when switching timelines - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: walsummarizer can get stuck when switching timelines
Date
Msg-id ABE387F1-27B4-41E0-9608-D5F6B0C290FE@yandex-team.ru
Whole thread
In response to Re: walsummarizer can get stuck when switching timelines  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers

> On 2 Aug 2026, at 21:00, Alexander Lakhin <exclusion@gmail.com> wrote:
> 
> So it looks like the test might fail when the checkpoint record slips into
> segment 4.


I think swapping two SQL statements would be enough:

 $node2->safe_psql('postgres', <<EOM);
-SELECT pg_switch_wal();
 CHECKPOINT;
+SELECT pg_switch_wal();
 EOM

The CHECKPOINT is what gives the summarizer a redo point to close the
timeline-2 summary at, and node3 only ever reads completed segments from
the archive, so it has to be before pg_switch_wal().

CI shows no problems with this change to me.


Best regards, Andrey Borodin.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add pg_stat_kind_info system view
Next
From: Matthias van de Meent
Date:
Subject: Re: Bug: XLogReader mishandles oversized multi-page xl_tot_len (potential memory corruption)