Re: Apparent bug in WAL summarizer process (hung state) - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Apparent bug in WAL summarizer process (hung state)
Date
Msg-id CA+TgmoYfMLM1gWUAG8RD9=f1eb-L09dETzohm=j8X_Cr8zpvqg@mail.gmail.com
Whole thread Raw
In response to Apparent bug in WAL summarizer process (hung state)  (Israel Barth Rubio <barthisrael@gmail.com>)
Responses Re: Apparent bug in WAL summarizer process (hung state)
List pgsql-hackers
On Mon, Jun 24, 2024 at 1:56 PM Israel Barth Rubio
<barthisrael@gmail.com> wrote:
> I've been playing a bit with the incremental backup feature which might come as
> part of the 17 release, and I think I hit a possible bug in the WAL summarizer
> process.
>
> The issue that I face refers to the summarizer process getting into a hung state.
> When the issue is triggered, it keeps in an infinite loop trying to process a WAL
> file that no longer exists.  It apparently comes up only when I perform changes to
> `wal_summarize` GUC and reload Postgres, while there is some load in Postgres
> which makes it recycle WAL files.

Yeah, this is a bug. It seems that the WAL summarizer process, when
restarted, wants to restart from wherever it was previously
summarizing WAL, which is correct if that WAL is still around, but if
summarize_wal has been turned off in the meanwhile, it might not be
correct. Here's a patch to fix that.

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

Attachment

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: improve predefined roles documentation
Next
From: Tom Lane
Date:
Subject: Re: Apparent bug in WAL summarizer process (hung state)