From 4982d08338df9c9cd9503f37b58753e18d17113d Mon Sep 17 00:00:00 2001 From: Hemny Date: Fri, 18 Jun 2021 15:26:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=9C=BA=E8=BF=9E=E6=8E=A5=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E8=B5=B0=E9=9D=9EHA=E7=AB=AF=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E9=85=8D=E7=BD=AE=E4=B8=AD=E7=9A=84=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E4=BF=A1=E6=81=AF=E5=86=B3=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/process/postmaster/postmaster.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gausskernel/process/postmaster/postmaster.cpp b/src/gausskernel/process/postmaster/postmaster.cpp index 0b94e2cc6..6fc96b1ce 100755 --- a/src/gausskernel/process/postmaster/postmaster.cpp +++ b/src/gausskernel/process/postmaster/postmaster.cpp @@ -3238,7 +3238,7 @@ int ProcessStartupPacket(Port* port, bool SSLdone) #endif } } else if (strcmp(nameptr, "replication") == 0) { - if (!IsHAPort(u_sess->proc_cxt.MyProcPort) && g_instance.attr.attr_common.enable_thread_pool) { + if (IsLocalPort(u_sess->proc_cxt.MyProcPort) && g_instance.attr.attr_common.enable_thread_pool) { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("replication should connect HA port in thread_pool"))); @@ -3259,6 +3259,11 @@ int ProcessStartupPacket(Port* port, bool SSLdone) if (!g_instance.attr.attr_storage.enable_mix_replication) t_thrd.datasender_cxt.am_datasender = true; } else if (strcmp(valptr, "database") == 0) { + if (!IsHAPort(u_sess->proc_cxt.MyProcPort) && g_instance.attr.attr_common.enable_thread_pool) { + ereport(elevel, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("logical replication should connect HA port in thread_pool"))); + } t_thrd.role = WAL_DB_SENDER; } else { bool _am_normal_walsender = false;