Re: Apparent bug in WAL summarizer process (hung state)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Israel Barth Rubio <barthisrael(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Apparent bug in WAL summarizer process (hung state)
Date: 2024-06-25 19:48:07
Message-ID: CA+TgmoYfMLM1gWUAG8RD9=f1eb-L09dETzohm=j8X_Cr8zpvqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 24, 2024 at 1:56 PM Israel Barth Rubio
<barthisrael(at)gmail(dot)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 Content-Type Size
v1-0001-Prevent-summarizer-hang-when-summarize_wal-turn-o.patch application/octet-stream 8.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-06-25 19:51:24 Re: Apparent bug in WAL summarizer process (hung state)
Previous Message Nathan Bossart 2024-06-25 19:26:46 Re: improve predefined roles documentation