forked from huawei/openGauss-server
fix bug
Offering: openGaussDev More detail: 修复分区表DDL回滚后使用全局分区索引扫描数据丢失的问题 Match-id-a93d94a074d384ac493a696380c7d848fdee36cd
This commit is contained in:
parent
370ce09096
commit
e896716077
|
@ -82,7 +82,6 @@ static bool _bt_isequal(Relation idxrel, Page page, OffsetNumber offnum, int key
|
|||
static void _bt_vacuum_one_page(Relation rel, Buffer buffer, Relation heapRel);
|
||||
static bool CheckItemIsAlive(ItemPointer tid, Relation relation, Snapshot snapshot, bool* all_dead,
|
||||
CUDescScan* cudescScan);
|
||||
static bool CheckPartitionIsInvisible(GPIScanDesc gpiScan);
|
||||
|
||||
/*
|
||||
* _bt_doinsert() -- Handle insertion of a single index tuple in the tree.
|
||||
|
@ -2400,7 +2399,7 @@ static bool CheckItemIsAlive(ItemPointer tid, Relation relation, Snapshot snapsh
|
|||
}
|
||||
}
|
||||
|
||||
static bool CheckPartitionIsInvisible(GPIScanDesc gpiScan)
|
||||
bool CheckPartitionIsInvisible(GPIScanDesc gpiScan)
|
||||
{
|
||||
if (OidRBTreeMemberOid(gpiScan->invisiblePartTreeForVacuum, gpiScan->currPartOid)) {
|
||||
return true;
|
||||
|
|
|
@ -763,7 +763,9 @@ static TransactionId UBTreeCheckUnique(Relation rel, IndexTuple itup, Relation h
|
|||
if (curPartOid != gpiScan->currPartOid) {
|
||||
GPISetCurrPartOid(gpiScan, curPartOid);
|
||||
if (!GPIGetNextPartRelation(gpiScan, CurrentMemoryContext, AccessShareLock)) {
|
||||
ItemIdMarkDead(curitemid);
|
||||
if (CheckPartitionIsInvisible(gpiScan)) {
|
||||
ItemIdMarkDead(curitemid);
|
||||
}
|
||||
opaque->btpo_flags |= BTP_HAS_GARBAGE;
|
||||
if (nbuf != InvalidBuffer) {
|
||||
MarkBufferDirtyHint(nbuf, true);
|
||||
|
|
|
@ -1081,6 +1081,7 @@ extern TransactionId _bt_check_unique(Relation rel, IndexTuple itup, Relation he
|
|||
CBIScanDesc cbiScan, CUDescScan* cudesc);
|
||||
extern bool SearchBufferAndCheckUnique(Relation rel, IndexTuple itup, IndexUniqueCheck checkUnique, Relation heapRel,
|
||||
GPIScanDesc gpiScan, CBIScanDesc cbiScan, CUDescScan* cudescScan, BTCheckElement* element);
|
||||
extern bool CheckPartitionIsInvisible(GPIScanDesc gpiScan);
|
||||
|
||||
/*
|
||||
* prototypes for functions in nbtpage.c
|
||||
|
|
Loading…
Reference in New Issue