recovery.conf changes whitout restart

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

recovery.conf changes whitout restart

Amine Tengilimoglu
  Hi all;

      Is there any way that have effect  primary conn info changes whitout restart in pg?
I want to keep going after change the primary conn info in recovery.conf. But we need to restart it...Is there any way to do it?

      And can I restart the postgresql in sql command?  



Reply | Threaded
Open this post in threaded view
|

Re: recovery.conf changes whitout restart

Guillaume Lelarge-3
Le jeu. 14 mars 2019 à 09:13, Amine Tengilimoglu <[hidden email]> a écrit :
  Hi all;

      Is there any way that have effect  primary conn info changes whitout restart in pg?
I want to keep going after change the primary conn info in recovery.conf. But we need to restart it...Is there any way to do it?


No, you have to restart PostgreSQL.

      And can I restart the postgresql in sql command?  


Nope.


--
Guillaume.
Reply | Threaded
Open this post in threaded view
|

Re: recovery.conf changes whitout restart

Flavio Henrique Araque Gurgel
> Le jeu. 14 mars 2019 à 09:13, Amine Tengilimoglu <[hidden email]> a écrit :
>>
>>   Hi all;
>>
>>       Is there any way that have effect  primary conn info changes whitout restart in pg?
>> I want to keep going after change the primary conn info in recovery.conf. But we need to restart it...Is there any way to do it?
>>
>
> No, you have to restart PostgreSQL.

One thing I do in production is to use a DNS CNAME to point to the
desired origin, so I can change the CNAME destination and just drop
the old connection, standby PostgreSQL will catchup in the new otigin
without restart. Create the replication slot beforehand in the new
origin is useful and, obviously, do not forget to drop it in the old
one.

Flavio Gurgel

Reply | Threaded
Open this post in threaded view
|

Re: recovery.conf changes whitout restart

Amine Tengilimoglu
Ok. Thank you for your answers.

Flavio Henrique Araque Gurgel <[hidden email]>, 14 Mar 2019 Per, 13:09 tarihinde şunu yazdı:
> Le jeu. 14 mars 2019 à 09:13, Amine Tengilimoglu <[hidden email]> a écrit :
>>
>>   Hi all;
>>
>>       Is there any way that have effect  primary conn info changes whitout restart in pg?
>> I want to keep going after change the primary conn info in recovery.conf. But we need to restart it...Is there any way to do it?
>>
>
> No, you have to restart PostgreSQL.

One thing I do in production is to use a DNS CNAME to point to the
desired origin, so I can change the CNAME destination and just drop
the old connection, standby PostgreSQL will catchup in the new otigin
without restart. Create the replication slot beforehand in the new
origin is useful and, obviously, do not forget to drop it in the old
one.

Flavio Gurgel