fix up 自动化连跑时多线程并发调用init_gauss_cluster_config导致coredump

This commit is contained in:
cchen676 2021-06-02 15:52:01 +08:00
parent cfb2309a2f
commit 2ed6eb7e73
1 changed files with 2 additions and 1 deletions

View File

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