aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/heap/heapam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/heap/heapam.c')
-rw-r--r--src/backend/access/heap/heapam.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index b9a6072c799..af5325ea632 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.178 2004/10/12 21:54:34 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.179 2004/10/15 22:39:42 tgl Exp $
*
*
* INTERFACE ROUTINES
@@ -1314,7 +1314,7 @@ heap_delete(Relation relation, ItemPointer tid,
tp.t_tableOid = relation->rd_id;
l1:
- result = HeapTupleSatisfiesUpdate(tp.t_data, cid);
+ result = HeapTupleSatisfiesUpdate(tp.t_data, cid, buffer);
if (result == HeapTupleInvisible)
{
@@ -1331,7 +1331,7 @@ l1:
XactLockTableWait(xwait);
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);
- if (TransactionIdDidAbort(xwait))
+ if (!TransactionIdDidCommit(xwait))
goto l1;
/*
@@ -1356,7 +1356,7 @@ l1:
if (crosscheck != InvalidSnapshot && result == HeapTupleMayBeUpdated)
{
/* Perform additional check for serializable RI updates */
- if (!HeapTupleSatisfiesSnapshot(tp.t_data, crosscheck))
+ if (!HeapTupleSatisfiesSnapshot(tp.t_data, crosscheck, buffer))
result = HeapTupleUpdated;
}
@@ -1543,7 +1543,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
*/
l2:
- result = HeapTupleSatisfiesUpdate(oldtup.t_data, cid);
+ result = HeapTupleSatisfiesUpdate(oldtup.t_data, cid, buffer);
if (result == HeapTupleInvisible)
{
@@ -1560,7 +1560,7 @@ l2:
XactLockTableWait(xwait);
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);
- if (TransactionIdDidAbort(xwait))
+ if (!TransactionIdDidCommit(xwait))
goto l2;
/*
@@ -1585,7 +1585,7 @@ l2:
if (crosscheck != InvalidSnapshot && result == HeapTupleMayBeUpdated)
{
/* Perform additional check for serializable RI updates */
- if (!HeapTupleSatisfiesSnapshot(oldtup.t_data, crosscheck))
+ if (!HeapTupleSatisfiesSnapshot(oldtup.t_data, crosscheck, buffer))
result = HeapTupleUpdated;
}
@@ -1871,7 +1871,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer,
tuple->t_len = ItemIdGetLength(lp);
l3:
- result = HeapTupleSatisfiesUpdate(tuple->t_data, cid);
+ result = HeapTupleSatisfiesUpdate(tuple->t_data, cid, *buffer);
if (result == HeapTupleInvisible)
{
@@ -1888,7 +1888,7 @@ l3:
XactLockTableWait(xwait);
LockBuffer(*buffer, BUFFER_LOCK_EXCLUSIVE);
- if (TransactionIdDidAbort(xwait))
+ if (!TransactionIdDidCommit(xwait))
goto l3;
/*