diff --git a/src/gausskernel/storage/access/heap/heapam_visibility.cpp b/src/gausskernel/storage/access/heap/heapam_visibility.cpp index eb700d618..6d277a0a7 100644 --- a/src/gausskernel/storage/access/heap/heapam_visibility.cpp +++ b/src/gausskernel/storage/access/heap/heapam_visibility.cpp @@ -793,11 +793,21 @@ restart: } } - /* no member, even just a locker, alive anymore */ - if (!MultiXactIdIsRunning(HeapTupleHeaderGetXmax(page, tuple))) + /* + * By here, the update in the Xmax is either aborted or crashed, but + * what about the other members? + */ + if (!MultiXactIdIsRunning(HeapTupleHeaderGetXmax(page, tuple))) { + /* + * There's no member, even just a locker, alive anymore, so we can + * mark the Xmax as invalid. + */ SetHintBits(tuple, buffer, HEAP_XMAX_INVALID, InvalidTransactionId); - /* it must have aborted or crashed */ - return TM_Ok; + return TM_Ok; + } else { + /* There are lockers running */ + return TM_BeingModified; + } } if (TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmax(page, tuple))) {