!2904 [共享存储] 重置dms/dss日志路径

Merge pull request !2904 from 陈婷婷/master
This commit is contained in:
opengauss-bot
2023-02-14 08:09:13 +00:00
committed by Gitee

View File

@ -428,15 +428,7 @@ 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
ret = snprintf_s(sslog_path, DMS_LOG_PATH_LEN, DMS_LOG_PATH_LEN - 1, "%s/pg_log", realPath);
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")));