From 2ed6eb7e73f7d8d2fbe449d1990472e27c12287d Mon Sep 17 00:00:00 2001 From: cchen676 Date: Wed, 2 Jun 2021 15:52:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=20up=20=E8=87=AA=E5=8A=A8=E5=8C=96=E8=BF=9E?= =?UTF-8?q?=E8=B7=91=E6=97=B6=E5=A4=9A=E7=BA=BF=E7=A8=8B=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E8=B0=83=E7=94=A8init=5Fgauss=5Fcluster=5Fconfig=E5=AF=BC?= =?UTF-8?q?=E8=87=B4coredump?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/storage/replication/syncrep.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gausskernel/storage/replication/syncrep.cpp b/src/gausskernel/storage/replication/syncrep.cpp index 4280db23cb..dd65b07439 100644 --- a/src/gausskernel/storage/replication/syncrep.cpp +++ b/src/gausskernel/storage/replication/syncrep.cpp @@ -1518,7 +1518,8 @@ bool check_synchronous_standby_names(char **newval, void **extra, GucSource sour return false; } /* get current cluster information from cluster_staic_config */ - if (strcmp(u_sess->attr.attr_common.application_name, "gsql") == 0 && has_static_config()) { + if (t_thrd.role == WORKER && strcmp(u_sess->attr.attr_common.application_name, "gsql") == 0 + && has_static_config()) { if (0 != init_gauss_cluster_config()) { goto pass; } -- Gitee