Re: Resetting recovery target parameters in pg_createsubscriber

From: Alena Vinter <dlaaren8(at)gmail(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Ilyasov Ian <ianilyasov(at)outlook(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Resetting recovery target parameters in pg_createsubscriber
Date: 2025-11-10 05:02:14
Message-ID: CAGWv16Jp6UPeR-16HzVZSXrjWGmrz1M_1CujwpJiMaQtog-2+A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 4 Nov 2025 at 04:28, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
wrote:

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

Alexander, I'm not in favor of saving additional files. This approach seems
to replace one type of leftover artifact (recovery params) with another
(debug-files). Neither option is good.
As Michael pointed out, the parameters might be useful for post-debugging
purposes. This suggests to me that they are, by nature, debugging
information. Therefore, it seems appropriate that they should be captured
by the verbose/debug mode. If verbose mode isn't used, we lose more than
just the recovery parameters — we also lose the sequence of commands for
managing replication slots and other steps. Following this logic, why not
save all information in non-verbose mode that might be used for debugging?

Robert, I'll think more about a valid scenario (including the one you
proposed) and get back with results later.

---
Regards,
Alena Vinter

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Tatarintsev 2025-11-10 05:14:57 pg_getaddrinfo_all() with hintp=NULL
Previous Message Peter Smith 2025-11-10 04:50:52 Re: POC: enable logical decoding when wal_level = 'replica' without a server restart