From 6a109d550d96a79ad9b297f124c347b120857e7f Mon Sep 17 00:00:00 2001 From: wangzhijun2018 Date: Wed, 26 Aug 2020 14:22:17 +0800 Subject: [PATCH] fix gtt error for analyze verify --- src/gausskernel/optimizer/commands/verify.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gausskernel/optimizer/commands/verify.cpp b/src/gausskernel/optimizer/commands/verify.cpp index 479f1f32a4..11ea1b7b27 100644 --- a/src/gausskernel/optimizer/commands/verify.cpp +++ b/src/gausskernel/optimizer/commands/verify.cpp @@ -41,6 +41,7 @@ #include "catalog/index.h" #include "catalog/pgxc_class.h" #include "catalog/storage.h" +#include "catalog/storage_gtt.h" #include "catalog/pg_hashbucket_fn.h" #include "commands/cluster.h" #include "commands/tablespace.h" @@ -1201,6 +1202,10 @@ static void VerifyRowRel(VacuumStmt* stmt, Relation rel, VerifyDesc* checkCudesc */ static bool VerifyRowRelFast(Relation rel, VerifyDesc* checkCudesc) { + if (RELATION_IS_GLOBAL_TEMP(rel) && !gtt_storage_attached(RelationGetRelid(rel))) { + return true; + } + char* buf = (char*)palloc(BLCKSZ); BlockNumber nblocks; BlockNumber blkno; @@ -1256,6 +1261,10 @@ static bool VerifyRowRelFast(Relation rel, VerifyDesc* checkCudesc) */ static bool VerifyRowRelComplete(Relation rel, VerifyDesc* checkCudesc) { + if (RELATION_IS_GLOBAL_TEMP(rel) && !gtt_storage_attached(RelationGetRelid(rel))) { + return true; + } + HeapScanDesc scandesc; HeapTuple tuple; TupleDesc tupleDesc; -- Gitee