修补不同步配置文件的bug
This commit is contained in:
@ -2786,7 +2786,13 @@ static int WalSndLoop(WalSndSendDataCallback send_data)
|
||||
marked_stream_replication = u_sess->attr.attr_storage.enable_stream_replication;
|
||||
ProcessConfigFile(PGC_SIGHUP);
|
||||
SyncRepInitConfig();
|
||||
sync_config_needed = true;
|
||||
if (g_instance.attr.attr_common.sync_config_strategy == ALL_NODE ||
|
||||
(g_instance.attr.attr_common.sync_config_strategy == ONLY_SYNC_NODE &&
|
||||
t_thrd.walsender_cxt.MyWalSnd->sync_standby_priority > 0)) {
|
||||
sync_config_needed = true;
|
||||
} else {
|
||||
sync_config_needed = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* switchover is forbidden when catchup thread in progress */
|
||||
@ -2906,10 +2912,7 @@ static int WalSndLoop(WalSndSendDataCallback send_data)
|
||||
}
|
||||
}
|
||||
|
||||
if (sync_config_needed &&
|
||||
(g_instance.attr.attr_common.sync_config_strategy == ALL_NODE ||
|
||||
(g_instance.attr.attr_common.sync_config_strategy == ONLY_SYNC_NODE &&
|
||||
t_thrd.walsender_cxt.MyWalSnd->sync_standby_priority > 0))) {
|
||||
if (sync_config_needed) {
|
||||
if (t_thrd.walsender_cxt.walsender_shutdown_requested) {
|
||||
if (!AM_WAL_DB_SENDER && !SendConfigFile(t_thrd.walsender_cxt.gucconf_file))
|
||||
ereport(LOG, (errmsg("failed to send config to the peer when walsender shutdown.")));
|
||||
|
Reference in New Issue
Block a user