mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Allow walreceiver configuration to change on reload
The parameters primary_conninfo, primary_slot_name and wal_receiver_create_temp_slot can now be changed with a simple "reload" signal, no longer requiring a server restart. This is achieved by signalling the walreceiver process to terminate and having it start again with the new values. Thanks to Andres Freund, Kyotaro Horiguchi, Fujii Masao for discussion. Author: Sergei Kornilov <sk@zsrv.org> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/19513901543181143@sas1-19a94364928d.qloud-c.yandex.net
This commit is contained in:
@@ -679,7 +679,11 @@ WalRcvWaitForStartPosition(XLogRecPtr *startpoint, TimeLineID *startpointTLI)
|
||||
walrcv->walRcvState == WALRCV_STOPPING);
|
||||
if (walrcv->walRcvState == WALRCV_RESTARTING)
|
||||
{
|
||||
/* we don't expect primary_conninfo to change */
|
||||
/*
|
||||
* No need to handle changes in primary_conninfo or
|
||||
* primary_slotname here. Startup process will signal us to
|
||||
* terminate in case those change.
|
||||
*/
|
||||
*startpoint = walrcv->receiveStart;
|
||||
*startpointTLI = walrcv->receiveStartTLI;
|
||||
walrcv->walRcvState = WALRCV_STREAMING;
|
||||
|
Reference in New Issue
Block a user