@@ -166,9 +166,9 @@ HeapTupleSatisfiesSelf(HeapTuple htup, Snapshot snapshot, Buffer buffer)
166166Assert (ItemPointerIsValid (& htup -> t_self ));
167167Assert (htup -> t_tableOid != InvalidOid );
168168
169- if (!(tuple -> t_infomask & HEAP_XMIN_COMMITTED ))
169+ if (!HeapTupleHeaderXminCommitted (tuple ))
170170{
171- if (tuple -> t_infomask & HEAP_XMIN_INVALID )
171+ if (HeapTupleHeaderXminInvalid ( tuple ) )
172172return false;
173173
174174/* Used by pre-9.0 binary upgrades */
@@ -210,7 +210,7 @@ HeapTupleSatisfiesSelf(HeapTuple htup, Snapshot snapshot, Buffer buffer)
210210}
211211}
212212}
213- else if (TransactionIdIsCurrentTransactionId (HeapTupleHeaderGetXmin (tuple )))
213+ else if (TransactionIdIsCurrentTransactionId (HeapTupleHeaderGetRawXmin (tuple )))
214214{
215215if (tuple -> t_infomask & HEAP_XMAX_INVALID )/* xid invalid */
216216return true;
@@ -244,11 +244,11 @@ HeapTupleSatisfiesSelf(HeapTuple htup, Snapshot snapshot, Buffer buffer)
244244
245245return false;
246246}
247- else if (TransactionIdIsInProgress (HeapTupleHeaderGetXmin (tuple )))
247+ else if (TransactionIdIsInProgress (HeapTupleHeaderGetRawXmin (tuple )))
248248return false;
249- else if (TransactionIdDidCommit (HeapTupleHeaderGetXmin (tuple )))
249+ else if (TransactionIdDidCommit (HeapTupleHeaderGetRawXmin (tuple )))
250250SetHintBits (tuple ,buffer ,HEAP_XMIN_COMMITTED ,
251- HeapTupleHeaderGetXmin (tuple ));
251+ HeapTupleHeaderGetRawXmin (tuple ));
252252else
253253{
254254/* it must have aborted or crashed */
@@ -356,9 +356,9 @@ HeapTupleSatisfiesToast(HeapTuple htup, Snapshot snapshot,
356356Assert (ItemPointerIsValid (& htup -> t_self ));
357357Assert (htup -> t_tableOid != InvalidOid );
358358
359- if (!(tuple -> t_infomask & HEAP_XMIN_COMMITTED ))
359+ if (!HeapTupleHeaderXminCommitted (tuple ))
360360{
361- if (tuple -> t_infomask & HEAP_XMIN_INVALID )
361+ if (HeapTupleHeaderXminInvalid ( tuple ) )
362362return false;
363363
364364/* Used by pre-9.0 binary upgrades */
@@ -441,9 +441,9 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
441441Assert (ItemPointerIsValid (& htup -> t_self ));
442442Assert (htup -> t_tableOid != InvalidOid );
443443
444- if (!(tuple -> t_infomask & HEAP_XMIN_COMMITTED ))
444+ if (!HeapTupleHeaderXminCommitted (tuple ))
445445{
446- if (tuple -> t_infomask & HEAP_XMIN_INVALID )
446+ if (HeapTupleHeaderXminInvalid ( tuple ) )
447447return HeapTupleInvisible ;
448448
449449/* Used by pre-9.0 binary upgrades */
@@ -485,7 +485,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
485485}
486486}
487487}
488- else if (TransactionIdIsCurrentTransactionId (HeapTupleHeaderGetXmin (tuple )))
488+ else if (TransactionIdIsCurrentTransactionId (HeapTupleHeaderGetRawXmin (tuple )))
489489{
490490if (HeapTupleHeaderGetCmin (tuple ) >=curcid )
491491return HeapTupleInvisible ;/* inserted after scan started */
@@ -564,11 +564,11 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
564564else
565565return HeapTupleInvisible ;/* updated before scan started */
566566}
567- else if (TransactionIdIsInProgress (HeapTupleHeaderGetXmin (tuple )))
567+ else if (TransactionIdIsInProgress (HeapTupleHeaderGetRawXmin (tuple )))
568568return HeapTupleInvisible ;
569- else if (TransactionIdDidCommit (HeapTupleHeaderGetXmin (tuple )))
569+ else if (TransactionIdDidCommit (HeapTupleHeaderGetRawXmin (tuple )))
570570SetHintBits (tuple ,buffer ,HEAP_XMIN_COMMITTED ,
571- HeapTupleHeaderGetXmin (tuple ));
571+ HeapTupleHeaderGetRawXmin (tuple ));
572572else
573573{
574574/* it must have aborted or crashed */
@@ -715,9 +715,9 @@ HeapTupleSatisfiesDirty(HeapTuple htup, Snapshot snapshot,
715715
716716snapshot -> xmin = snapshot -> xmax = InvalidTransactionId ;
717717
718- if (!(tuple -> t_infomask & HEAP_XMIN_COMMITTED ))
718+ if (!HeapTupleHeaderXminCommitted (tuple ))
719719{
720- if (tuple -> t_infomask & HEAP_XMIN_INVALID )
720+ if (HeapTupleHeaderXminInvalid ( tuple ) )
721721return false;
722722
723723/* Used by pre-9.0 binary upgrades */
@@ -759,7 +759,7 @@ HeapTupleSatisfiesDirty(HeapTuple htup, Snapshot snapshot,
759759}
760760}
761761}
762- else if (TransactionIdIsCurrentTransactionId (HeapTupleHeaderGetXmin (tuple )))
762+ else if (TransactionIdIsCurrentTransactionId (HeapTupleHeaderGetRawXmin (tuple )))
763763{
764764if (tuple -> t_infomask & HEAP_XMAX_INVALID )/* xid invalid */
765765return true;
@@ -793,15 +793,15 @@ HeapTupleSatisfiesDirty(HeapTuple htup, Snapshot snapshot,
793793
794794return false;
795795}
796- else if (TransactionIdIsInProgress (HeapTupleHeaderGetXmin (tuple )))
796+ else if (TransactionIdIsInProgress (HeapTupleHeaderGetRawXmin (tuple )))
797797{
798- snapshot -> xmin = HeapTupleHeaderGetXmin (tuple );
798+ snapshot -> xmin = HeapTupleHeaderGetRawXmin (tuple );
799799/* XXX shouldn't we fall through to look at xmax? */
800800return true;/* in insertion by other */
801801}
802- else if (TransactionIdDidCommit (HeapTupleHeaderGetXmin (tuple )))
802+ else if (TransactionIdDidCommit (HeapTupleHeaderGetRawXmin (tuple )))
803803SetHintBits (tuple ,buffer ,HEAP_XMIN_COMMITTED ,
804- HeapTupleHeaderGetXmin (tuple ));
804+ HeapTupleHeaderGetRawXmin (tuple ));
805805else
806806{
807807/* it must have aborted or crashed */
@@ -909,9 +909,9 @@ HeapTupleSatisfiesMVCC(HeapTuple htup, Snapshot snapshot,
909909Assert (ItemPointerIsValid (& htup -> t_self ));
910910Assert (htup -> t_tableOid != InvalidOid );
911911
912- if (!(tuple -> t_infomask & HEAP_XMIN_COMMITTED ))
912+ if (!HeapTupleHeaderXminCommitted (tuple ))
913913{
914- if (tuple -> t_infomask & HEAP_XMIN_INVALID )
914+ if (HeapTupleHeaderXminInvalid ( tuple ) )
915915return false;
916916
917917/* Used by pre-9.0 binary upgrades */
@@ -953,7 +953,7 @@ HeapTupleSatisfiesMVCC(HeapTuple htup, Snapshot snapshot,
953953}
954954}
955955}
956- else if (TransactionIdIsCurrentTransactionId (HeapTupleHeaderGetXmin (tuple )))
956+ else if (TransactionIdIsCurrentTransactionId (HeapTupleHeaderGetRawXmin (tuple )))
957957{
958958if (HeapTupleHeaderGetCmin (tuple ) >=snapshot -> curcid )
959959return false;/* inserted after scan started */
@@ -995,11 +995,11 @@ HeapTupleSatisfiesMVCC(HeapTuple htup, Snapshot snapshot,
995995else
996996return false;/* deleted before scan started */
997997}
998- else if (TransactionIdIsInProgress (HeapTupleHeaderGetXmin (tuple )))
998+ else if (TransactionIdIsInProgress (HeapTupleHeaderGetRawXmin (tuple )))
999999return false;
1000- else if (TransactionIdDidCommit (HeapTupleHeaderGetXmin (tuple )))
1000+ else if (TransactionIdDidCommit (HeapTupleHeaderGetRawXmin (tuple )))
10011001SetHintBits (tuple ,buffer ,HEAP_XMIN_COMMITTED ,
1002- HeapTupleHeaderGetXmin (tuple ));
1002+ HeapTupleHeaderGetRawXmin (tuple ));
10031003else
10041004{
10051005/* it must have aborted or crashed */
@@ -1013,7 +1013,8 @@ HeapTupleSatisfiesMVCC(HeapTuple htup, Snapshot snapshot,
10131013 * By here, the inserting transaction has committed - have to check
10141014 * when...
10151015 */
1016- if (XidInMVCCSnapshot (HeapTupleHeaderGetXmin (tuple ),snapshot ))
1016+ if (!HeapTupleHeaderXminFrozen (tuple )
1017+ && XidInMVCCSnapshot (HeapTupleHeaderGetRawXmin (tuple ),snapshot ))
10171018return false;/* treat as still in progress */
10181019
10191020if (tuple -> t_infomask & HEAP_XMAX_INVALID )/* xid invalid or aborted */
@@ -1116,9 +1117,9 @@ HeapTupleSatisfiesVacuum(HeapTuple htup, TransactionId OldestXmin,
11161117 * If the inserting transaction aborted, then the tuple was never visible
11171118 * to any other transaction, so we can delete it immediately.
11181119 */
1119- if (!(tuple -> t_infomask & HEAP_XMIN_COMMITTED ))
1120+ if (!HeapTupleHeaderXminCommitted (tuple ))
11201121{
1121- if (tuple -> t_infomask & HEAP_XMIN_INVALID )
1122+ if (HeapTupleHeaderXminInvalid ( tuple ) )
11221123return HEAPTUPLE_DEAD ;
11231124/* Used by pre-9.0 binary upgrades */
11241125else if (tuple -> t_infomask & HEAP_MOVED_OFF )
@@ -1157,7 +1158,7 @@ HeapTupleSatisfiesVacuum(HeapTuple htup, TransactionId OldestXmin,
11571158return HEAPTUPLE_DEAD ;
11581159}
11591160}
1160- else if (TransactionIdIsInProgress (HeapTupleHeaderGetXmin (tuple )))
1161+ else if (TransactionIdIsInProgress (HeapTupleHeaderGetRawXmin (tuple )))
11611162{
11621163if (tuple -> t_infomask & HEAP_XMAX_INVALID )/* xid invalid */
11631164return HEAPTUPLE_INSERT_IN_PROGRESS ;
@@ -1168,9 +1169,9 @@ HeapTupleSatisfiesVacuum(HeapTuple htup, TransactionId OldestXmin,
11681169/* inserted and then deleted by same xact */
11691170return HEAPTUPLE_DELETE_IN_PROGRESS ;
11701171}
1171- else if (TransactionIdDidCommit (HeapTupleHeaderGetXmin (tuple )))
1172+ else if (TransactionIdDidCommit (HeapTupleHeaderGetRawXmin (tuple )))
11721173SetHintBits (tuple ,buffer ,HEAP_XMIN_COMMITTED ,
1173- HeapTupleHeaderGetXmin (tuple ));
1174+ HeapTupleHeaderGetRawXmin (tuple ));
11741175else
11751176{
11761177/*
@@ -1347,8 +1348,8 @@ HeapTupleIsSurelyDead(HeapTuple htup, TransactionId OldestXmin)
13471348 * invalid, then we assume it's still alive (since the presumption is that
13481349 * all relevant hint bits were just set moments ago).
13491350 */
1350- if (!(tuple -> t_infomask & HEAP_XMIN_COMMITTED ))
1351- return (tuple -> t_infomask & HEAP_XMIN_INVALID ) != 0 ? true : false;
1351+ if (!HeapTupleHeaderXminCommitted (tuple ))
1352+ return HeapTupleHeaderXminInvalid (tuple ) ? true : false;
13521353
13531354/*
13541355 * If the inserting transaction committed, but any deleting transaction