!2862 【共享存储】更新dms/dss日志路径

Merge pull request !2862 from 陈婷婷/master
This commit is contained in:
opengauss-bot
2023-02-03 11:02:31 +00:00
committed by Gitee

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")));