|
7 | 7 | * |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.43 1999/05/25 16:07:04 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.44 1999/06/10 14:17:05 vadim Exp $ |
11 | 11 | * |
12 | 12 | * |
13 | 13 | * INTERFACE ROUTINES |
@@ -1152,8 +1152,13 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid) |
1152 | 1152 | LockBuffer(buffer,BUFFER_LOCK_EXCLUSIVE); |
1153 | 1153 | if (TransactionIdDidAbort(xwait)) |
1154 | 1154 | gotol1; |
1155 | | -/* concurrent xact committed */ |
1156 | | -Assert(tp.t_data->t_xmax==xwait); |
| 1155 | +/* |
| 1156 | + * xwait is committed but if xwait had just marked |
| 1157 | + * the tuple for update then some other xaction could |
| 1158 | + * update this tuple before we got to this point. |
| 1159 | + */ |
| 1160 | +if (tp.t_data->t_xmax!=xwait) |
| 1161 | +gotol1; |
1157 | 1162 | if (!(tp.t_data->t_infomask&HEAP_XMAX_COMMITTED)) |
1158 | 1163 | { |
1159 | 1164 | tp.t_data->t_infomask |=HEAP_XMAX_COMMITTED; |
@@ -1242,8 +1247,13 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple newtup, |
1242 | 1247 | LockBuffer(buffer,BUFFER_LOCK_EXCLUSIVE); |
1243 | 1248 | if (TransactionIdDidAbort(xwait)) |
1244 | 1249 | gotol2; |
1245 | | -/* concurrent xact committed */ |
1246 | | -Assert(oldtup.t_data->t_xmax==xwait); |
| 1250 | +/* |
| 1251 | + * xwait is committed but if xwait had just marked |
| 1252 | + * the tuple for update then some other xaction could |
| 1253 | + * update this tuple before we got to this point. |
| 1254 | + */ |
| 1255 | +if (oldtup.t_data->t_xmax!=xwait) |
| 1256 | +gotol2; |
1247 | 1257 | if (!(oldtup.t_data->t_infomask&HEAP_XMAX_COMMITTED)) |
1248 | 1258 | { |
1249 | 1259 | oldtup.t_data->t_infomask |=HEAP_XMAX_COMMITTED; |
@@ -1359,8 +1369,13 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer) |
1359 | 1369 | LockBuffer(*buffer,BUFFER_LOCK_EXCLUSIVE); |
1360 | 1370 | if (TransactionIdDidAbort(xwait)) |
1361 | 1371 | gotol3; |
1362 | | -/* concurrent xact committed */ |
1363 | | -Assert(tuple->t_data->t_xmax==xwait); |
| 1372 | +/* |
| 1373 | + * xwait is committed but if xwait had just marked |
| 1374 | + * the tuple for update then some other xaction could |
| 1375 | + * update this tuple before we got to this point. |
| 1376 | + */ |
| 1377 | +if (tuple->t_data->t_xmax!=xwait) |
| 1378 | +gotol3; |
1364 | 1379 | if (!(tuple->t_data->t_infomask&HEAP_XMAX_COMMITTED)) |
1365 | 1380 | { |
1366 | 1381 | tuple->t_data->t_infomask |=HEAP_XMAX_COMMITTED; |
|