diff --git a/src/bin/initdb/initdb.cpp b/src/bin/initdb/initdb.cpp index e1010c075bc45f9c2341d4b1e0bfca1e0a14627b..a86381e11bad34ac781b4dc4fbf60de6e74d47e6 100644 --- a/src/bin/initdb/initdb.cpp +++ b/src/bin/initdb/initdb.cpp @@ -5641,7 +5641,12 @@ static void InitUndoSubsystemMeta(void) char undoFilePath[MAXPGPATH] = {'\0'}; char tmpUndoFile[MAXPGPATH] = {'\0'}; - printf("Begin init undo subsystem meta.\n"); + if (enable_dss) { + printf("Skip init undo subsystem meta in shared storage mode.\n"); + return; + } else { + printf("Begin init undo subsystem meta.\n"); + } rc = sprintf_s(undoFilePath, sizeof(undoFilePath), "%s/%s", pg_data, UNDO_META_FILE); securec_check_ss_c(rc, "\0", "\0"); rc = sprintf_s(tmpUndoFile, sizeof(tmpUndoFile), "%s/%s_%s", pg_data, UNDO_META_FILE, "tmp"); diff --git a/src/bin/initdb/ss_initdb.cpp b/src/bin/initdb/ss_initdb.cpp index 7d7c0366b54b37d8540f53a01f48b5b1040a666f..b7d0a251a831c45386debb9a02f9e82764ac83ff 100644 --- a/src/bin/initdb/ss_initdb.cpp +++ b/src/bin/initdb/ss_initdb.cpp @@ -60,9 +60,6 @@ static const char* ss_instanceowndirs[] = {"base", "global", "pg_xlog", "pg_xlog/archive_status", - "undo", - "undo/unlogged", - "undo/temp", "pg_stat_tmp", "pg_errorinfo", "pg_logical", diff --git a/src/gausskernel/storage/access/ustore/undo/knl_uundoapi.cpp b/src/gausskernel/storage/access/ustore/undo/knl_uundoapi.cpp index 53748c73ed7c87d26889e71dbd23934d98384b33..072eb116254568ec6b0d9572ed4319cb6bc8fd6e 100644 --- a/src/gausskernel/storage/access/ustore/undo/knl_uundoapi.cpp +++ b/src/gausskernel/storage/access/ustore/undo/knl_uundoapi.cpp @@ -601,6 +601,10 @@ static void InitUndoMeta(void) void RecoveryUndoSystemMeta(void) { + if (ENABLE_DMS) { + ereport(LOG, (errmsg("Skip recovery undo system meta in shared storage mode."))); + return; + } if (t_thrd.role == STARTUP) { /* Ensure that the undometa file exists. */ if (access(UNDO_META_FILE, F_OK) != 0) { @@ -935,4 +939,4 @@ bool CheckUndoMetaBuf(char *undoMeta) Assert(undoMeta != NULL); return CheckUndoZone(undoMeta) && CheckUndoSpace(undoMeta, UNDO_LOG_SPACE) && CheckUndoSpace(undoMeta, UNDO_SLOT_SPACE); -} \ No newline at end of file +}