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

From Thom Brown
Subject Re: walsummarizer can get stuck when switching timelines
Date
Msg-id CAA-aLv58mQKN3UmdK2moahPJSy7yfd9-BnxfBWNMdTRThmrE7w@mail.gmail.com
Whole thread
In response to Re: walsummarizer can get stuck when switching timelines  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: walsummarizer can get stuck when switching timelines
List pgsql-hackers
On Wed, 15 Jul 2026 at 21:19, Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Wed, Jul 15, 2026 at 1:43 PM Srinath Reddy Sadipiralla
> <srinath2133@gmail.com> wrote:
> > a nitpick in the 003_tli_switch.pl file the comment says
> > "....giving it a ".partial" suffix, and is not archived," but AFAIK,
> > We do archive the .partial files right? CleanupAfterArchiveRecovery
> > renames and notifies the archiver, or am I reading it wrong?
>
> You're right. I'll reword the comment.
>
> > +1
>
> I think this is all a digression from the problem at hand. I
> understand Andrey's probable desire to have me review his patch on
> that thread, but I think whatever is going on there is only
> tangentially related to this problem.

+# Cause the partial segment to get archived on the *new* timeline.
+#
+# In more detail: the WAL segment that contains the current insert
LSN exists on
+# timeline 1, but since all we did is CREATE TABLE dummy (), it
wasn't full. We're
+# now running on timeline 2, and pg_switch_wal() fills up the rest of
the segment.
+# So the full segment should get archived on timeline 2, but not on timeline 1.
+# We do a CHECKPOINT here to make sure that the summarizer tries to progress.
+$node2->safe_psql('postgres', <<EOM);
+SELECT pg_switch_wal();
+CHECKPOINT;

Wouldn't we want the checkpoint's redo record to make it into the
archived segment *before* switching wal?

Thom



pgsql-hackers by date:

Previous
From: solai v
Date:
Subject: Re: pg_hosts: Add pg_hosts_file_rules()
Next
From: Daniel Gustafsson
Date:
Subject: Re: pg_hosts: Add pg_hosts_file_rules()