|
|
|
|
@ -8,7 +8,7 @@ |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* IDENTIFICATION |
|
|
|
|
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.149 2002/09/26 22:46:29 tgl Exp $ |
|
|
|
|
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.149.2.1 2004/10/13 22:22:21 tgl Exp $ |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* INTERFACE ROUTINES |
|
|
|
|
@ -1271,6 +1271,7 @@ heap_delete(Relation relation, ItemPointer tid, |
|
|
|
|
PageHeader dp; |
|
|
|
|
Buffer buffer; |
|
|
|
|
int result; |
|
|
|
|
uint16 sv_infomask; |
|
|
|
|
|
|
|
|
|
/* increment access statistics */ |
|
|
|
|
IncrHeapAccessStat(local_delete); |
|
|
|
|
@ -1294,7 +1295,10 @@ heap_delete(Relation relation, ItemPointer tid, |
|
|
|
|
tp.t_tableOid = relation->rd_id; |
|
|
|
|
|
|
|
|
|
l1: |
|
|
|
|
sv_infomask = tp.t_data->t_infomask; |
|
|
|
|
result = HeapTupleSatisfiesUpdate(&tp, cid); |
|
|
|
|
if (sv_infomask != tp.t_data->t_infomask) |
|
|
|
|
SetBufferCommitInfoNeedsSave(buffer); |
|
|
|
|
|
|
|
|
|
if (result == HeapTupleInvisible) |
|
|
|
|
{ |
|
|
|
|
@ -1311,7 +1315,7 @@ l1: |
|
|
|
|
XactLockTableWait(xwait); |
|
|
|
|
|
|
|
|
|
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE); |
|
|
|
|
if (TransactionIdDidAbort(xwait)) |
|
|
|
|
if (!TransactionIdDidCommit(xwait)) |
|
|
|
|
goto l1; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@ -1470,6 +1474,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup, |
|
|
|
|
Size newtupsize, |
|
|
|
|
pagefree; |
|
|
|
|
int result; |
|
|
|
|
uint16 sv_infomask; |
|
|
|
|
|
|
|
|
|
/* increment access statistics */ |
|
|
|
|
IncrHeapAccessStat(local_replace); |
|
|
|
|
@ -1498,7 +1503,10 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup, |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
l2: |
|
|
|
|
sv_infomask = oldtup.t_data->t_infomask; |
|
|
|
|
result = HeapTupleSatisfiesUpdate(&oldtup, cid); |
|
|
|
|
if (sv_infomask != oldtup.t_data->t_infomask) |
|
|
|
|
SetBufferCommitInfoNeedsSave(buffer); |
|
|
|
|
|
|
|
|
|
if (result == HeapTupleInvisible) |
|
|
|
|
{ |
|
|
|
|
@ -1515,7 +1523,7 @@ l2: |
|
|
|
|
XactLockTableWait(xwait); |
|
|
|
|
|
|
|
|
|
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE); |
|
|
|
|
if (TransactionIdDidAbort(xwait)) |
|
|
|
|
if (!TransactionIdDidCommit(xwait)) |
|
|
|
|
goto l2; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@ -1795,6 +1803,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer, |
|
|
|
|
ItemId lp; |
|
|
|
|
PageHeader dp; |
|
|
|
|
int result; |
|
|
|
|
uint16 sv_infomask; |
|
|
|
|
|
|
|
|
|
/* increment access statistics */ |
|
|
|
|
IncrHeapAccessStat(local_mark4update); |
|
|
|
|
@ -1814,7 +1823,10 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer, |
|
|
|
|
tuple->t_len = ItemIdGetLength(lp); |
|
|
|
|
|
|
|
|
|
l3: |
|
|
|
|
sv_infomask = tuple->t_data->t_infomask; |
|
|
|
|
result = HeapTupleSatisfiesUpdate(tuple, cid); |
|
|
|
|
if (sv_infomask != tuple->t_data->t_infomask) |
|
|
|
|
SetBufferCommitInfoNeedsSave(*buffer); |
|
|
|
|
|
|
|
|
|
if (result == HeapTupleInvisible) |
|
|
|
|
{ |
|
|
|
|
@ -1831,7 +1843,7 @@ l3: |
|
|
|
|
XactLockTableWait(xwait); |
|
|
|
|
|
|
|
|
|
LockBuffer(*buffer, BUFFER_LOCK_EXCLUSIVE); |
|
|
|
|
if (TransactionIdDidAbort(xwait)) |
|
|
|
|
if (!TransactionIdDidCommit(xwait)) |
|
|
|
|
goto l3; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|