6.0fix 升级未提交时的归档问题

This commit is contained in:
hejiahuan11
2025-02-25 10:46:04 +08:00
committed by jinyangzhen
parent ba182c902e
commit fa18f55ce6
3 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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)) {

View File

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