From a19439e8b09e5dfbd0a0a807c56b450335f934c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E8=92=99=E6=81=A9?= <1836611252@qq.com> Date: Mon, 8 Mar 2021 15:46:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E7=BA=BF=E6=89=A9?= =?UTF-8?q?=E5=AE=B9=E4=BB=A3=E7=A0=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/postmaster/postmaster.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gausskernel/process/postmaster/postmaster.cpp b/src/gausskernel/process/postmaster/postmaster.cpp index 2716a6d58..138aeba97 100755 --- a/src/gausskernel/process/postmaster/postmaster.cpp +++ b/src/gausskernel/process/postmaster/postmaster.cpp @@ -9496,14 +9496,16 @@ static void check_and_reset_ha_listen_port(void) signal_child(g_instance.pid_cxt.RemoteServicePID, SIGTERM); ListenSocketRegulation(); - - if (t_thrd.postmaster_cxt.HaShmData != NULL && - t_thrd.postmaster_cxt.HaShmData->repl_list_num == 0 && - t_thrd.postmaster_cxt.HaShmData->current_mode == PRIMARY_MODE) { - t_thrd.postmaster_cxt.HaShmData->current_mode = NORMAL_MODE; - SetServerMode(NORMAL_MODE); - } } + +#ifndef ENABLE_MULTIPLE_NODES + if (t_thrd.postmaster_cxt.HaShmData != NULL && + t_thrd.postmaster_cxt.HaShmData->repl_list_num == 0 && + t_thrd.postmaster_cxt.HaShmData->current_mode == PRIMARY_MODE) { + t_thrd.postmaster_cxt.HaShmData->current_mode = NORMAL_MODE; + SetServerMode(NORMAL_MODE); + } +#endif return; }