diff options
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
-rw-r--r-- | src/backend/access/gist/gistxlog.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/backend/access/gist/gistxlog.c b/src/backend/access/gist/gistxlog.c index f2eda79bc1a..1c80eae044a 100644 --- a/src/backend/access/gist/gistxlog.c +++ b/src/backend/access/gist/gistxlog.c @@ -394,28 +394,8 @@ gistRedoPageReuse(XLogReaderState *record) * same exclusion effect on primary and standby. */ if (InHotStandby) - { - FullTransactionId latestRemovedFullXid = xlrec->latestRemovedFullXid; - FullTransactionId nextXid = ReadNextFullTransactionId(); - uint64 diff; - - /* - * ResolveRecoveryConflictWithSnapshot operates on 32-bit - * TransactionIds, so truncate the logged FullTransactionId. If the - * logged value is very old, so that XID wrap-around already happened - * on it, there can't be any snapshots that still see it. - */ - diff = U64FromFullTransactionId(nextXid) - - U64FromFullTransactionId(latestRemovedFullXid); - if (diff < MaxTransactionId / 2) - { - TransactionId latestRemovedXid; - - latestRemovedXid = XidFromFullTransactionId(latestRemovedFullXid); - ResolveRecoveryConflictWithSnapshot(latestRemovedXid, - xlrec->node); - } - } + ResolveRecoveryConflictWithSnapshotFullXid(xlrec->latestRemovedFullXid, + xlrec->node); } void |