Re: Resetting recovery target parameters in pg_createsubscriber

Alena Vinter <dlaaren8@gmail.com>

From: Alena Vinter <dlaaren8@gmail.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>, Ilyasov Ian <ianilyasov@outlook.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-25T06:45:56Z
Lists: pgsql-hackers

Attachments

It seems my previous message isn't visible in the thread. I can see
Robert's reply, but not the original message he was responding to. I'm
resending the message and all attachments to ensure it's saved in the
thread.

On Thu, 13 Nov 2025 at 19:45, Alena Vinter <dlaaren8@gmail.com> wrote:

> Hi everyone!
>
> Robert, here's a realistic scenario where the issue occurs:
> 1. Start with a primary and physical standby
> 2. Convert the standby to a logical replica using `pg_createsubscriber`
> 3. Later, create a new physical standby from a backup of this logical
> replica
> 4. The new standby fails to start because it cannot reach consistency point
>
> The root cause is that `pg_createsubscriber` leaves behind recovery
> parameters that interfere with the new standby's startup process, causing
> recovery to stop before reaching a consistency point.
>
> To demonstrate this, I've expanded the existing '
> 040_pg_createsubscriber.pl' test to include this scenario. I've also
> attached a standalone TAP test below for easier verification of the
> specific failure case.
>
> ---
> Regards,
> Alena Vinter
>