Re: Resetting recovery target parameters in pg_createsubscriber - Mailing list pgsql-hackers

From Alena Vinter
Subject Re: Resetting recovery target parameters in pg_createsubscriber
Date
Msg-id CAGWv16+KwkDzS1-Wj-w_5O5cYCBgqVA5MacTHek_zO27sDrnOQ@mail.gmail.com
Whole thread Raw
In response to Re: Resetting recovery target parameters in pg_createsubscriber  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
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
Attachment

pgsql-hackers by date:

Previous
From: Amul Sul
Date:
Subject: Re: pg_waldump: support decoding of WAL inside tarfile
Next
From: wenhui qiu
Date:
Subject: Re: Add 64-bit XIDs into PostgreSQL 15