更新dms/dss日志路径

This commit is contained in:
chentingting
2023-02-03 17:27:57 +08:00
parent 3ba06d6995
commit e9f29064dd

View File

@ -428,8 +428,15 @@ void GetSSLogPath(char *sslog_path)
}
sslog_path[0] = '\0';
#ifndef ENABLE_MULTIPLE_NODES
ret = snprintf_s(sslog_path, DMS_LOG_PATH_LEN, DMS_LOG_PATH_LEN - 1, "%s/pg_log/%s", realPath,
g_instance.exec_cxt.global_application_name);
#else
ret = snprintf_s(sslog_path, DMS_LOG_PATH_LEN, DMS_LOG_PATH_LEN - 1, "%s/pg_log/%s", realPath,
g_instance.attr.attr_common.PGXCNodeName);
#endif
securec_check_ss(ret, "", "");
if (pg_mkdir_p(sslog_path, S_IRWXU) != 0 && errno !=EEXIST) {
ereport(FATAL, (errmsg("failed to mkdir $GAUSSLOG[DataDir]/pg_log")));