Re: Resetting recovery target parameters in pg_createsubscriber
| От | Alexander Korotkov | 
|---|---|
| Тема | Re: Resetting recovery target parameters in pg_createsubscriber | 
| Дата | |
| Msg-id | CAPpHfdt88BQyuT3pRqouk+1Lsosa9_Orwt6eVTCUiDa9C89_bA@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: Resetting recovery target parameters in pg_createsubscriber (Alena Vinter <dlaaren8@gmail.com>) | 
| Список | pgsql-hackers | 
On Mon, Oct 27, 2025 at 2:22 PM Alena Vinter <dlaaren8@gmail.com> 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.conffile is sufficient. All modifications made by pg_createsubscriber in this file are append-only, so truncationreliably 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 configurationas debug output, so the full parameter set remains visible in the logs for inspection when needed. My pointis that adding include directives isn't needed, as we already have debug output, and, moreover, they aren't appliedto 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
В списке pgsql-hackers по дате отправления: