fix gs_guc配置synchrounous_name参数失败
社区代码回合时错误导致
This commit is contained in:
@ -1877,18 +1877,14 @@ char* get_AZ_value(const char* value, const char* data_dir)
|
||||
|
||||
if (NULL == nodenameList) {
|
||||
// try dn
|
||||
len = strlen(q);
|
||||
len = strlen(q) + 1;
|
||||
s = (char *)pg_malloc_zero(len * sizeof(char));
|
||||
nRet = snprintf_s(s, len + 1, len, "%s", q);
|
||||
nRet = snprintf_s(s, len, len - 1, "%s", q);
|
||||
securec_check_ss_c(nRet, s, "\0");
|
||||
|
||||
vptr = strtok_r(s, delims, &vouter_ptr);
|
||||
while (vptr != NULL) {
|
||||
p = vptr;
|
||||
int len_p = strlen(p) + 1;
|
||||
char *temp = (char *)pg_malloc_zero(len_p * sizeof(char));
|
||||
nRet = snprintf_s(temp, len_p + 1, len_p, "%s,", p);
|
||||
securec_check_ss_c(nRet, temp, "\0");
|
||||
|
||||
if (CheckDataNameValue(p, data_dir) == false) {
|
||||
goto failed;
|
||||
|
||||
@ -4070,11 +4070,11 @@ static void find_nested_pgconf(const char** optlines, char* opt_name)
|
||||
while (isspace((unsigned char)*p)) {
|
||||
p++;
|
||||
}
|
||||
pg_fatal(
|
||||
_("There is nested config file in postgresql.conf: %sWhich is not supported by full build. "
|
||||
pg_log(PG_WARNING,
|
||||
_("There is nested config file in postgresql.conf: %sWhich is not supported by build. "
|
||||
"Please move out the nested config files from %s and comment the 'include' config in postgresql.conf.\n"
|
||||
"You can add option '-q' to disable autostart during full build and restore the change manually "
|
||||
"before starting gaussdb."),
|
||||
"You can add option '-q' to disable autostart during build and restore the change manually "
|
||||
"before starting gaussdb.\n"),
|
||||
p,
|
||||
pg_data);
|
||||
exit(1);
|
||||
@ -4093,6 +4093,11 @@ static void check_nested_pgconf(void)
|
||||
config_file[MAXPGPATH - 1] = '\0';
|
||||
optlines = readfile(config_file);
|
||||
|
||||
if (optlines == NULL) {
|
||||
pg_log(PG_WARNING, _("%s cannot be opened.\n"), config_file);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)lengthof(optname); i++) {
|
||||
find_nested_pgconf((const char**)optlines, optname[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user