Re: allow online change primary_conninfo - Mailing list pgsql-hackers

From Sergei Kornilov
Subject Re: allow online change primary_conninfo
Date
Msg-id 181051568904366@sas1-ffdbcd5f1d77.qloud-c.yandex.net
Whole thread Raw
In response to Re: allow online change primary_conninfo  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: allow online change primary_conninfo
List pgsql-hackers
Hello

Thank you for review!

> - This parameter can only be set at server start.
> + This parameter can only be set in the <filename>postgresql.conf</filename>
> + file or on the server command line.
>
> I'm not sure it's good to change the context of this
> description. This was mentioning that changing of this parameter
> requires server (re)start. So if we want to be on the same
> context after rewriting, it would be like "This parameter can be
> set any time and causes WAL receiver restart with the new setting
> if the server is in standby mode."

Was written such way after this review:
https://www.postgresql.org/message-id/20181125214313.lydvmrraqjfrb3s2%40alap3.anarazel.de

> And If I'm not missing something, I don't find an (explict)
> paramter of postmaster for setting primary_conninfo.

Well, we have common -c option: -c name=value

> Couldn't we do the same thing by just skipping the wait and
> setting lastSourceFailed to true in the case of intentional
> walreceiver restart?

Yes, it's possible. Let's see... Done in attached variant.
We need check pendingWalRcvRestart before rescanLatestTimeLine lines.

regards, Sergei
Attachment

pgsql-hackers by date:

Previous
From: Alexey Kondratov
Date:
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly
Next
From: Thomas Berger
Date:
Subject: Usage of the system truststore for SSL certificate validation