From fa18f55ce612cfb9fe6ac44992f9391af940641a Mon Sep 17 00:00:00 2001 From: hejiahuan11 Date: Tue, 25 Feb 2025 10:46:04 +0800 Subject: [PATCH] =?UTF-8?q?6.0fix=20=E5=8D=87=E7=BA=A7=E6=9C=AA=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=97=B6=E7=9A=84=E5=BD=92=E6=A1=A3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/backend/utils/init/globals.cpp | 1 + src/gausskernel/process/postmaster/postmaster.cpp | 3 ++- src/include/miscadmin.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/backend/utils/init/globals.cpp b/src/common/backend/utils/init/globals.cpp index f44b67ba8..a0283d332 100644 --- a/src/common/backend/utils/init/globals.cpp +++ b/src/common/backend/utils/init/globals.cpp @@ -226,6 +226,7 @@ const uint32 CURSOR_EXPRESSION_VERSION_NUMBER = 92935; const uint32 FLOAT_VERSION_NUMBER = 92938; const uint32 PAGE_BASED_VERSION_NUM = 93039; +const uint32 SS_ARCHIVE_VERSION_NUM = 92923; /* This variable indicates wheather the instance is in progress of upgrade as a whole */ uint32 volatile WorkingGrandVersionNum = GRAND_VERSION_NUM; diff --git a/src/gausskernel/process/postmaster/postmaster.cpp b/src/gausskernel/process/postmaster/postmaster.cpp index 496675af3..bbf25bac0 100644 --- a/src/gausskernel/process/postmaster/postmaster.cpp +++ b/src/gausskernel/process/postmaster/postmaster.cpp @@ -4410,7 +4410,8 @@ static int ServerLoop(void) /* If we have lost the archiver, try to start a new one */ if (!dummyStandbyMode) { if (g_instance.pid_cxt.PgArchPID == 0 && pmState == PM_RUN && XLogArchivingActive() && - (XLogArchiveCommandSet() || XLogArchiveDestSet())) { + (XLogArchiveCommandSet() || XLogArchiveDestSet()) && + (!ENABLE_DSS || (pg_atomic_read_u32(&WorkingGrandVersionNum) >= SS_ARCHIVE_VERSION_NUM))) { g_instance.pid_cxt.PgArchPID = pgarch_start(); } else if (g_instance.archive_thread_info.obsArchPID != NULL && (pmState == PM_RUN || pmState == PM_HOT_STANDBY)) { diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 3348ede12..3c56899c6 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -165,6 +165,7 @@ extern const uint32 CAST_FUNC_VERSION_NUMBER; extern const uint32 HASH_SAOP_VERSION_NUMBER; extern const uint32 ASOFJOIN_VERSION_NUM; extern const uint32 PAGE_BASED_VERSION_NUM; +extern const uint32 SS_ARCHIVE_VERSION_NUM; extern void register_backend_version(uint32 backend_version); extern bool contain_backend_version(uint32 version_number);