fix parallel decoding visibility bug
Offering: openGaussDev More detail: parallel decoding fix physical addressing info bug. Match-id-491e37c4587a09f855ba3022206f5aaae7a8831f
This commit is contained in:
2
src/common/backend/utils/cache/relcache.cpp
vendored
2
src/common/backend/utils/cache/relcache.cpp
vendored
@ -2456,7 +2456,7 @@ void RelationInitPhysicalAddr(Relation relation)
|
||||
* tables and on user tables declared as additional catalog
|
||||
* tables.
|
||||
*/
|
||||
if (HistoricSnapshotActive() && RelationIsAccessibleInLogicalDecoding(relation) && IsTransactionState()) {
|
||||
if (HistoricSnapshotActive() && RelationIsAccessibleInLogicalDecoding(relation)) {
|
||||
HeapTuple phys_tuple;
|
||||
Form_pg_class physrel;
|
||||
|
||||
|
@ -74,7 +74,7 @@ CommitSeqNo TransactionIdGetCommitSeqNo(TransactionId transactionId, bool isComm
|
||||
* Before going to the commit log manager, check our single item cache to
|
||||
* see if we didn't just check the transaction status a moment ago.
|
||||
*/
|
||||
if ((snapshot == NULL || !IsVersionMVCCSnapshot(snapshot)) &&
|
||||
if ((snapshot == NULL || (!IsVersionMVCCSnapshot(snapshot) && !(snapshot->satisfies == SNAPSHOT_DECODE_MVCC))) &&
|
||||
TransactionIdEquals(transactionId, t_thrd.xact_cxt.cachedFetchCSNXid)) {
|
||||
t_thrd.xact_cxt.latestFetchCSNXid = t_thrd.xact_cxt.cachedFetchCSNXid;
|
||||
t_thrd.xact_cxt.latestFetchCSN = t_thrd.xact_cxt.cachedFetchCSN;
|
||||
@ -98,15 +98,15 @@ RETRY:
|
||||
* If the XID is older than RecentGlobalXmin, check the clog. Otherwise
|
||||
* check the csnlog.
|
||||
*/
|
||||
if (!isMvcc || GTM_LITE_MODE) {
|
||||
if (snapshot != NULL && snapshot->satisfies == SNAPSHOT_DECODE_MVCC) {
|
||||
xid = GetReplicationSlotCatalogXmin();
|
||||
} else if (!isMvcc || GTM_LITE_MODE) {
|
||||
TransactionId recentGlobalXmin = pg_atomic_read_u64(&t_thrd.xact_cxt.ShmemVariableCache->recentGlobalXmin);
|
||||
if (!TransactionIdIsValid(recentGlobalXmin)) {
|
||||
xid = t_thrd.xact_cxt.ShmemVariableCache->recentLocalXmin;
|
||||
} else {
|
||||
xid = recentGlobalXmin;
|
||||
}
|
||||
} else if (snapshot != NULL && snapshot->satisfies == SNAPSHOT_DECODE_MVCC) {
|
||||
xid = GetReplicationSlotCatalogXmin();
|
||||
} else if (snapshot != NULL && IsMVCCSnapshot(snapshot)) {
|
||||
xid = snapshot->xmin;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user