diff --git a/src/common/backend/utils/init/globals.cpp b/src/common/backend/utils/init/globals.cpp index fecd9de7..099d4c78 100644 --- a/src/common/backend/utils/init/globals.cpp +++ b/src/common/backend/utils/init/globals.cpp @@ -59,7 +59,7 @@ bool open_join_children = true; bool will_shutdown = false; /* hard-wired binary version number */ -const uint32 GRAND_VERSION_NUM = 92298; +const uint32 GRAND_VERSION_NUM = 92299; const uint32 MATVIEW_VERSION_NUM = 92213; const uint32 PARTIALPUSH_VERSION_NUM = 92087; @@ -77,6 +77,7 @@ const uint32 RANGE_LIST_DISTRIBUTION_VERSION_NUM = 92272; const uint32 BACKUP_SLOT_VERSION_NUM = 92282; const uint32 ML_OPT_MODEL_VERSION_NUM = 92284; const uint32 FIX_SQL_ADD_RELATION_REF_COUNT = 92291; +const uint32 STANDBY_ARCHIVING_VERSION_NUM = 92299; /* 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/storage/replication/slot.cpp b/src/gausskernel/storage/replication/slot.cpp index 408e00b7..5bf74aef 100644 --- a/src/gausskernel/storage/replication/slot.cpp +++ b/src/gausskernel/storage/replication/slot.cpp @@ -1807,6 +1807,11 @@ ObsArchiveConfig* formObsConfigFromStr(char *content, bool encrypted) goto FAILURE; } + /* cannot create archive slot when the version number is not larger than the standby archive version */ + if ((param_num == 4 || param_num == 8) && t_thrd.proc->workingVersionNum < STANDBY_ARCHIVING_VERSION_NUM) { + goto FAILURE; + } + if (param_num == 7) { obs_config->media_type = ARCHIVE_OBS; } else { diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index d3730420..4db86ca8 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -53,6 +53,7 @@ extern const uint32 PRIVS_VERSION_NUM; extern const uint32 ML_OPT_MODEL_VERSION_NUM; extern const uint32 RANGE_LIST_DISTRIBUTION_VERSION_NUM; extern const uint32 FIX_SQL_ADD_RELATION_REF_COUNT; +extern const uint32 STANDBY_ARCHIVING_VERSION_NUM; #define INPLACE_UPGRADE_PRECOMMIT_VERSION 1