On Sat, Feb 16, 2019 at 02:50:35PM +0300, Sergei Kornilov wrote: > + if ((strcmp(conninfo, PrimaryConnInfo) != 0 || > + strcmp(slotname, PrimarySlotName) != 0) && > + WalRcvRunning()) > + { > + ereport(LOG, > + (errmsg("terminating walreceiver process due to > change of %s", > + strcmp(conninfo, > PrimaryConnInfo) != 0 ? "primary_conninfo" : "primary_slot_name"), > + errdetail("In a moment starts streaming WAL > with new configuration."))); > + > + ShutdownWalRcv(); > + lastSourceFailed = true; > + }
If you do that, the startup process would try to jump to a different source to fetch WAL if archiving is enabled. Is that really what we want? It would be nice to have one message for primary_conninfo being updated, and one for primary_slot_name so as if both are changed at the same time the user gets the correct information. "In a moment starts streaming WAL with new configuration." sounds strange. It would be more natural to have something like "The WAL receiver is going to be restarted with the new configuration", just a suggestion. -- Michael
signature.asc
Description: PGP signature