On Mon, Oct 27, 2025 at 2:22 PM Alena Vinter <[email protected]> wrote: > Michael, thank you for outlining your alternative approach. > After rethinking the current patch state with a clearer vision, I realized > that simply truncating the postgresql.auto.conf file is sufficient. All > modifications made by pg_createsubscriber in this file are append-only, so > truncation reliably restores it to its original state without adding extra > logic. This keeps the patch small and clean. > > For older versions using recovery.conf, the situation differs — since that > file is fully rewritten during recovery setup, we instead restore the > previously saved original file using a durable rename. > > Regarding debugging: the contents are not entirely lost. pg_createsubscriber > already prints the new recovery configuration as debug output, so the full > parameter set remains visible in the logs for inspection when needed. My > point is that adding include directives isn't needed, as we already have > debug output, and, moreover, they aren't applied to recovery.conf.
I have rechecked this. It appears that pg_createsubscriber writes the recovery configuration to the output and only in verbose mode. So, it's far no guaranteed that this information would be accessible. One may run pg_createsubscriber not in verbose mode or don't save its output. I suggest we should re-implement this in a way Michael proposed [1]: save the configuration to pg_createsubscriber.conf.old file. Links. 1. https://www.postgresql.org/message-id/aOZOJ8p8LEcw0SpH%40paquier.xyz ------ Regards, Alexander Korotkov Supabase
