|
|
|
|
@ -50,7 +50,7 @@ |
|
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California |
|
|
|
|
* |
|
|
|
|
* IDENTIFICATION |
|
|
|
|
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.116 2010/02/08 04:33:54 tgl Exp $ |
|
|
|
|
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.117 2010/02/08 14:10:21 momjian Exp $ |
|
|
|
|
* |
|
|
|
|
*------------------------------------------------------------------------- |
|
|
|
|
*/ |
|
|
|
|
@ -91,7 +91,7 @@ static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot); |
|
|
|
|
* code in heapam.c relies on that!) |
|
|
|
|
* |
|
|
|
|
* Also, if we are cleaning up HEAP_MOVED_IN or HEAP_MOVED_OFF entries, then |
|
|
|
|
* we can always set the hint bits, since old-style VACUUM FULL always used |
|
|
|
|
* we can always set the hint bits, since pre-9.0 VACUUM FULL always used |
|
|
|
|
* synchronous commits and didn't move tuples that weren't previously |
|
|
|
|
* hinted. (This is not known by this subroutine, but is applied by its |
|
|
|
|
* callers.) Note: old-style VACUUM FULL is gone, but we have to keep this |
|
|
|
|
@ -167,6 +167,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer) |
|
|
|
|
if (tuple->t_infomask & HEAP_XMIN_INVALID) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
if (tuple->t_infomask & HEAP_MOVED_OFF) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -185,6 +186,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer) |
|
|
|
|
InvalidTransactionId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
else if (tuple->t_infomask & HEAP_MOVED_IN) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -338,6 +340,7 @@ HeapTupleSatisfiesNow(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer) |
|
|
|
|
if (tuple->t_infomask & HEAP_XMIN_INVALID) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
if (tuple->t_infomask & HEAP_MOVED_OFF) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -356,6 +359,7 @@ HeapTupleSatisfiesNow(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer) |
|
|
|
|
InvalidTransactionId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
else if (tuple->t_infomask & HEAP_MOVED_IN) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -502,6 +506,7 @@ HeapTupleSatisfiesToast(HeapTupleHeader tuple, Snapshot snapshot, |
|
|
|
|
if (tuple->t_infomask & HEAP_XMIN_INVALID) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
if (tuple->t_infomask & HEAP_MOVED_OFF) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -520,6 +525,7 @@ HeapTupleSatisfiesToast(HeapTupleHeader tuple, Snapshot snapshot, |
|
|
|
|
InvalidTransactionId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
else if (tuple->t_infomask & HEAP_MOVED_IN) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -581,6 +587,7 @@ HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid, |
|
|
|
|
if (tuple->t_infomask & HEAP_XMIN_INVALID) |
|
|
|
|
return HeapTupleInvisible; |
|
|
|
|
|
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
if (tuple->t_infomask & HEAP_MOVED_OFF) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -599,6 +606,7 @@ HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid, |
|
|
|
|
InvalidTransactionId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
else if (tuple->t_infomask & HEAP_MOVED_IN) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -748,6 +756,7 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple, Snapshot snapshot, |
|
|
|
|
if (tuple->t_infomask & HEAP_XMIN_INVALID) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
if (tuple->t_infomask & HEAP_MOVED_OFF) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -766,6 +775,7 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple, Snapshot snapshot, |
|
|
|
|
InvalidTransactionId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
else if (tuple->t_infomask & HEAP_MOVED_IN) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -907,6 +917,7 @@ HeapTupleSatisfiesMVCC(HeapTupleHeader tuple, Snapshot snapshot, |
|
|
|
|
if (tuple->t_infomask & HEAP_XMIN_INVALID) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
if (tuple->t_infomask & HEAP_MOVED_OFF) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -925,6 +936,7 @@ HeapTupleSatisfiesMVCC(HeapTupleHeader tuple, Snapshot snapshot, |
|
|
|
|
InvalidTransactionId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
else if (tuple->t_infomask & HEAP_MOVED_IN) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -1066,6 +1078,7 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin, |
|
|
|
|
{ |
|
|
|
|
if (tuple->t_infomask & HEAP_XMIN_INVALID) |
|
|
|
|
return HEAPTUPLE_DEAD; |
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
else if (tuple->t_infomask & HEAP_MOVED_OFF) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
@ -1083,6 +1096,7 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin, |
|
|
|
|
SetHintBits(tuple, buffer, HEAP_XMIN_COMMITTED, |
|
|
|
|
InvalidTransactionId); |
|
|
|
|
} |
|
|
|
|
/* Used by pre-9.0 binary upgrades */ |
|
|
|
|
else if (tuple->t_infomask & HEAP_MOVED_IN) |
|
|
|
|
{ |
|
|
|
|
TransactionId xvac = HeapTupleHeaderGetXvac(tuple); |
|
|
|
|
|