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.
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.