【共享存储】dms/dss 日志路径添加nodename

This commit is contained in:
chentingting
2023-02-01 16:01:24 +08:00
parent 017c9329f8
commit 4b01d2fcdd

View File

@ -428,7 +428,8 @@ void GetSSLogPath(char *sslog_path)
}
sslog_path[0] = '\0';
ret = snprintf_s(sslog_path, DMS_LOG_PATH_LEN, DMS_LOG_PATH_LEN - 1, "%s/pg_log", realPath);
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);
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")));