88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.129.2.2 2003/01/26 23:09:37 tgl Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.129.2.3 2004/10/13 22:22:41 tgl Exp $
1212 *
1313 *
1414 * INTERFACE ROUTINES
@@ -1155,6 +1155,7 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
11551155 PageHeader dp ;
11561156 Buffer buffer ;
11571157 int result ;
1158+ uint16 sv_infomask ;
11581159
11591160 /* increment access statistics */
11601161 IncrHeapAccessStat (local_delete );
@@ -1178,7 +1179,10 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
11781179 tp .t_tableOid = relation -> rd_id ;
11791180
11801181l1 :
1182+ sv_infomask = tp .t_data -> t_infomask ;
11811183 result = HeapTupleSatisfiesUpdate (& tp );
1184+ if (sv_infomask != tp .t_data -> t_infomask )
1185+ SetBufferCommitInfoNeedsSave (buffer );
11821186
11831187 if (result == HeapTupleInvisible )
11841188 {
@@ -1195,7 +1199,7 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
11951199 XactLockTableWait (xwait );
11961200
11971201 LockBuffer (buffer , BUFFER_LOCK_EXCLUSIVE );
1198- if (TransactionIdDidAbort (xwait ))
1202+ if (! TransactionIdDidCommit (xwait ))
11991203 goto l1 ;
12001204
12011205 /*
@@ -1345,6 +1349,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
13451349 Size newtupsize ,
13461350 pagefree ;
13471351 int result ;
1352+ uint16 sv_infomask ;
13481353
13491354 /* increment access statistics */
13501355 IncrHeapAccessStat (local_replace );
@@ -1373,7 +1378,10 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
13731378 */
13741379
13751380l2 :
1381+ sv_infomask = oldtup .t_data -> t_infomask ;
13761382 result = HeapTupleSatisfiesUpdate (& oldtup );
1383+ if (sv_infomask != oldtup .t_data -> t_infomask )
1384+ SetBufferCommitInfoNeedsSave (buffer );
13771385
13781386 if (result == HeapTupleInvisible )
13791387 {
@@ -1390,7 +1398,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
13901398 XactLockTableWait (xwait );
13911399
13921400 LockBuffer (buffer , BUFFER_LOCK_EXCLUSIVE );
1393- if (TransactionIdDidAbort (xwait ))
1401+ if (! TransactionIdDidCommit (xwait ))
13941402 goto l2 ;
13951403
13961404 /*
@@ -1651,6 +1659,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
16511659 ItemId lp ;
16521660 PageHeader dp ;
16531661 int result ;
1662+ uint16 sv_infomask ;
16541663
16551664 /* increment access statistics */
16561665 IncrHeapAccessStat (local_mark4update );
@@ -1670,7 +1679,10 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
16701679 tuple -> t_len = ItemIdGetLength (lp );
16711680
16721681l3 :
1682+ sv_infomask = tuple -> t_data -> t_infomask ;
16731683 result = HeapTupleSatisfiesUpdate (tuple );
1684+ if (sv_infomask != tuple -> t_data -> t_infomask )
1685+ SetBufferCommitInfoNeedsSave (* buffer );
16741686
16751687 if (result == HeapTupleInvisible )
16761688 {
@@ -1687,7 +1699,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
16871699 XactLockTableWait (xwait );
16881700
16891701 LockBuffer (* buffer , BUFFER_LOCK_EXCLUSIVE );
1690- if (TransactionIdDidAbort (xwait ))
1702+ if (! TransactionIdDidCommit (xwait ))
16911703 goto l3 ;
16921704
16931705 /*
0 commit comments