8
8
*
9
9
*
10
10
* 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 $
12
12
*
13
13
*
14
14
* INTERFACE ROUTINES
@@ -1155,6 +1155,7 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
1155
1155
PageHeader dp ;
1156
1156
Buffer buffer ;
1157
1157
int result ;
1158
+ uint16 sv_infomask ;
1158
1159
1159
1160
/* increment access statistics */
1160
1161
IncrHeapAccessStat (local_delete );
@@ -1178,7 +1179,10 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
1178
1179
tp .t_tableOid = relation -> rd_id ;
1179
1180
1180
1181
l1 :
1182
+ sv_infomask = tp .t_data -> t_infomask ;
1181
1183
result = HeapTupleSatisfiesUpdate (& tp );
1184
+ if (sv_infomask != tp .t_data -> t_infomask )
1185
+ SetBufferCommitInfoNeedsSave (buffer );
1182
1186
1183
1187
if (result == HeapTupleInvisible )
1184
1188
{
@@ -1195,7 +1199,7 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
1195
1199
XactLockTableWait (xwait );
1196
1200
1197
1201
LockBuffer (buffer , BUFFER_LOCK_EXCLUSIVE );
1198
- if (TransactionIdDidAbort (xwait ))
1202
+ if (! TransactionIdDidCommit (xwait ))
1199
1203
goto l1 ;
1200
1204
1201
1205
/*
@@ -1345,6 +1349,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
1345
1349
Size newtupsize ,
1346
1350
pagefree ;
1347
1351
int result ;
1352
+ uint16 sv_infomask ;
1348
1353
1349
1354
/* increment access statistics */
1350
1355
IncrHeapAccessStat (local_replace );
@@ -1373,7 +1378,10 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
1373
1378
*/
1374
1379
1375
1380
l2 :
1381
+ sv_infomask = oldtup .t_data -> t_infomask ;
1376
1382
result = HeapTupleSatisfiesUpdate (& oldtup );
1383
+ if (sv_infomask != oldtup .t_data -> t_infomask )
1384
+ SetBufferCommitInfoNeedsSave (buffer );
1377
1385
1378
1386
if (result == HeapTupleInvisible )
1379
1387
{
@@ -1390,7 +1398,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
1390
1398
XactLockTableWait (xwait );
1391
1399
1392
1400
LockBuffer (buffer , BUFFER_LOCK_EXCLUSIVE );
1393
- if (TransactionIdDidAbort (xwait ))
1401
+ if (! TransactionIdDidCommit (xwait ))
1394
1402
goto l2 ;
1395
1403
1396
1404
/*
@@ -1651,6 +1659,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
1651
1659
ItemId lp ;
1652
1660
PageHeader dp ;
1653
1661
int result ;
1662
+ uint16 sv_infomask ;
1654
1663
1655
1664
/* increment access statistics */
1656
1665
IncrHeapAccessStat (local_mark4update );
@@ -1670,7 +1679,10 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
1670
1679
tuple -> t_len = ItemIdGetLength (lp );
1671
1680
1672
1681
l3 :
1682
+ sv_infomask = tuple -> t_data -> t_infomask ;
1673
1683
result = HeapTupleSatisfiesUpdate (tuple );
1684
+ if (sv_infomask != tuple -> t_data -> t_infomask )
1685
+ SetBufferCommitInfoNeedsSave (* buffer );
1674
1686
1675
1687
if (result == HeapTupleInvisible )
1676
1688
{
@@ -1687,7 +1699,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
1687
1699
XactLockTableWait (xwait );
1688
1700
1689
1701
LockBuffer (* buffer , BUFFER_LOCK_EXCLUSIVE );
1690
- if (TransactionIdDidAbort (xwait ))
1702
+ if (! TransactionIdDidCommit (xwait ))
1691
1703
goto l3 ;
1692
1704
1693
1705
/*
0 commit comments