diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index f626755..023f78e 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -103,11 +103,18 @@ static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot); * * The caller should pass xid as the XID of the transaction to check, or * InvalidTransactionId if no check is needed. + * + * In case when the supplied HeapTuple is not associated with a particular + * buffer, it just returns without any jobs. It may happen when an extension + * caches tuple with their own way. */ static inline void SetHintBits(HeapTupleHeader tuple, Buffer buffer, uint16 infomask, TransactionId xid) { + if (BufferIsInvalid(buffer)) + return; + if (TransactionIdIsValid(xid)) { /* NB: xid must be known committed here! */