diff --git a/src/common/backend/utils/init/globals.cpp b/src/common/backend/utils/init/globals.cpp index 691c2571da62dcee959e0769955942375af50427..c37683e8ca3a5689b35161a28820fe246838378a 100644 --- a/src/common/backend/utils/init/globals.cpp +++ b/src/common/backend/utils/init/globals.cpp @@ -241,6 +241,7 @@ const uint32 PARTIALPUSH_VERSION_NUM = 92087; const uint32 CURSOR_EXPRESSION_VERSION_NUMBER = 92935; const uint32 FLOAT_VERSION_NUMBER = 92938; +const uint32 PAGE_BASED_VERSION_NUM = 93039; /* 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/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index 463d2fdb11804ac6a877015adc0a564b5e3f692d..67ad806135db3b4fe7292245e15d3c0a0e1f660c 100755 --- a/src/gausskernel/optimizer/commands/tablecmds.cpp +++ b/src/gausskernel/optimizer/commands/tablecmds.cpp @@ -3034,6 +3034,15 @@ ObjectAddress DefineRelation(CreateStmt* stmt, char relkind, Oid ownerId, Object } if (ENABLE_DMS && !u_sess->attr.attr_common.IsInplaceUpgrade) { + if (t_thrd.proc->workingVersionNum < PAGE_BASED_VERSION_NUM + && (stmt->relation->relpersistence == RELPERSISTENCE_UNLOGGED) + && (stmt->relation->relpersistence == RELPERSISTENCE_TEMP) + && (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP) + && (relkind == RELKIND_MATVIEW) + && (relkind == RELKIND_FOREIGN_TABLE)) { + ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("Page Characteristics Table not supported in current version!"))); + } if ((relkind == RELKIND_RELATION && storage_type != SEGMENT_PAGE && (stmt->relation->relpersistence != RELPERSISTENCE_UNLOGGED) && (stmt->relation->relpersistence != RELPERSISTENCE_TEMP) diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 7b834163c50ca41809bcdcd1c6d81d19ed224bc6..80ac64e525e9f5d35717d4bdc290ac2ccdc0fd4a 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -169,6 +169,7 @@ extern const uint32 IGNORE_NULLS_VERSION_NUMBER; 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 void register_backend_version(uint32 backend_version); extern bool contain_backend_version(uint32 version_number);