77 *
88 *
99 * IDENTIFICATION
10- * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.26 1999/03/28 20:32:29 vadim Exp $
10+ * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.27 1999/04/05 10:55:49 vadim Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -411,6 +411,12 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple)
411411
412412if (tuple -> t_infomask & HEAP_MOVED_OFF )
413413{
414+ /*
415+ * HeapTupleSatisfiesDirty is used by unique btree-s and so
416+ * may be used while vacuuming.
417+ */
418+ if (TransactionIdIsCurrentTransactionId ((TransactionId )tuple -> t_cmin ))
419+ return false;
414420if (TransactionIdDidCommit ((TransactionId )tuple -> t_cmin ))
415421{
416422tuple -> t_infomask |=HEAP_XMIN_INVALID ;
@@ -419,6 +425,8 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple)
419425}
420426else if (tuple -> t_infomask & HEAP_MOVED_IN )
421427{
428+ if (TransactionIdIsCurrentTransactionId ((TransactionId )tuple -> t_cmin ))
429+ return true;
422430if (!TransactionIdDidCommit ((TransactionId )tuple -> t_cmin ))
423431{
424432tuple -> t_infomask |=HEAP_XMIN_INVALID ;