Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: JoongHyuk Shin <sjh910805(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks
Date: 2026-07-20 18:12:40
Message-ID: CAHGQGwH_KD4drGPk4yPKH880yCVNbo8ruaE_UeVWrHKWW1VuUA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 21, 2026 at 2:21 AM Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> Hi,
>
> On 2026-Jul-20, Fujii Masao wrote:
>
> > Thanks for the review! I've pushed the patches.
>
> Skink is failing this one
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2026-07-20%2013%3A07%3A56

Thanks for the report!

In the test added by commit b15039d82d4, the standby restores WAL only
from the archive and waits until it reaches the target LSN. However,
the test records that LSN after pg_switch_wal() in the primary,
so it points into the newly started WAL file. Since pg_switch_wal()
archives only the previous WAL file, the one containing the target LSN
is not yet available in the archive. As a result, the standby waits
indefinitely for that WAL file and eventually times out.

The attached patch fixes this by recording the target LSN before calling
pg_switch_wal(). If CI reports no issues, I'll commit it.

Regards,

--
Fujii Masao

Attachment Content-Type Size
v1-0001-Fix-recovery-target-test-waiting-on-unavailable-W.patch application/octet-stream 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-07-20 18:13:04 Re: document the dangers of granting TRIGGER or REFERENCES
Previous Message Antonin Houska 2026-07-20 17:48:37 Re: Unexpected behavior after OOM errors