索引加固

修复STAT_UNDO_LOG_SIZE长度不足导致check报错
This commit is contained in:
sundechao
2024-06-07 18:08:28 +08:00
committed by yaoxin
parent 5363008a15
commit 3ff7aa248f
3 changed files with 6 additions and 2 deletions

View File

@ -77,7 +77,7 @@ const int UNDO_TOPUSED = 0;
const int UNDO_SECONDUSED = 1;
const int UNDO_THIRDUSED = 2;
const int PG_STAT_USP_PERSIST_META_COLS = 9;
const int STAT_UNDO_LOG_SIZE = 17;
const int STAT_UNDO_LOG_SIZE = 32;
const int PG_STAT_UBTREE_IDX_VERFIY_COLS = 4;
const int PG_STAT_UBTREE_RECYCLE_QUEUE_COLS = 6;
const int PG_STAT_TRANSLOT_META_COLS = 7;

View File

@ -902,7 +902,7 @@ NON_EXEC_STATIC void TxnSnapCapturerMain()
TxnSnapCapProcInterrupts(rc);
/* Do the hard work. */
if (TcapFeatureAvail()) {
if (TcapFeatureAvail() && ENABLE_TCAP_VERSION) {
TxnSnapCapImpl();
}

View File

@ -124,6 +124,10 @@ static bool TvFeatureSupport(Oid relid, char **errstr, bool isTimecapsuleTable)
Relation rel = RelationIdGetRelation(relid);
Form_pg_class classForm;
if (!ENABLE_TCAP_VERSION) {
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("timecapsule feature is not enabled.")));
}
if (!RelationIsValid(rel)) {
ereport(ERROR, (errcode(ERRCODE_RELATION_OPEN_ERROR),
errmsg("could not open relation with OID %u", relid)));