From 29c5bb6f7cd9358912d0fe669960364e8d4a150f Mon Sep 17 00:00:00 2001 From: Hemny Date: Fri, 18 Jun 2021 09:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E4=BD=BF=E7=94=A8replicat?= =?UTF-8?q?ion=E5=8D=8F=E8=AE=AE=E8=BF=9E=E6=8E=A5=E7=9B=91=E5=90=AC?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E5=90=8E,=E6=95=B0=E6=8D=AE=E5=BA=93stop?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=20openGauss?= =?UTF-8?q?=E4=B8=AD=EF=BC=8Creplication=E5=8D=8F=E8=AE=AE=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E7=94=A8=E7=BA=BF=E7=A8=8B=E6=B1=A0=E7=9A=84=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E3=80=82=20=E5=A6=82=E6=9E=9C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=90=AF=E7=94=A8=E4=BA=86=E7=BA=BF=E7=A8=8B=E6=B1=A0?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E4=B8=94=E5=87=BA=E7=8E=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=A4=B1=E8=AF=AF=E4=BD=BF=E7=94=A8=E4=BA=86?= =?UTF-8?q?replication=E5=8D=8F=E8=AE=AE=E5=B7=A5=E5=85=B7=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E7=9B=91=E5=90=AC=E7=AB=AF=E5=8F=A3=EF=BC=8C=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E5=A4=B1=E8=B4=A5=E5=90=8E=E9=80=A0=E6=88=90=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=BA=BF=E7=A8=8B=E7=9B=B4=E6=8E=A5=E9=80=80=E5=87=BA?= =?UTF-8?q?=EF=BC=8C=E5=BC=95=E8=B5=B7gs=5Fctl=20stop=E5=81=9C=E5=BA=93?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现在直接在连接数据库时限制如果线程池模式下,replication工具只能通过HA端口连接数据库。 --- src/gausskernel/process/postmaster/postmaster.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gausskernel/process/postmaster/postmaster.cpp b/src/gausskernel/process/postmaster/postmaster.cpp index 28026179c..0b94e2cc6 100755 --- a/src/gausskernel/process/postmaster/postmaster.cpp +++ b/src/gausskernel/process/postmaster/postmaster.cpp @@ -3238,6 +3238,12 @@ 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) { + ereport(elevel, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("replication should connect HA port in thread_pool"))); + } + /* * Due to backward compatibility concerns the replication * parameter is a hybrid beast which allows the value to be @@ -3253,11 +3259,6 @@ 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;