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; }