mirror of
https://github.com/postgres/postgres.git
synced 2025-10-29 22:49:41 +03:00
Fix all the places that called heap_update() and heap_delete() without
bothering to check the return value --- which meant that in case the update or delete failed because of a concurrent update, you'd not find out about it, except by observing later that the transaction produced the wrong outcome. There are now subroutines simple_heap_update and simple_heap_delete that should be used anyplace that you're not prepared to do the full nine yards of coping with concurrent updates. In practice, that seems to mean absolutely everywhere but the executor, because *noplace* else was checking.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: heapam.h,v 1.60 2000/12/27 23:59:13 tgl Exp $
|
||||
* $Id: heapam.h,v 1.61 2001/01/23 04:32:23 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -209,6 +209,9 @@ extern int heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid);
|
||||
extern int heap_update(Relation relation, ItemPointer otid, HeapTuple tup,
|
||||
ItemPointer ctid);
|
||||
extern int heap_mark4update(Relation relation, HeapTuple tup, Buffer *userbuf);
|
||||
extern void simple_heap_delete(Relation relation, ItemPointer tid);
|
||||
extern void simple_heap_update(Relation relation, ItemPointer otid,
|
||||
HeapTuple tup);
|
||||
extern void heap_markpos(HeapScanDesc scan);
|
||||
extern void heap_restrpos(HeapScanDesc scan);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user