Thread: pgsql/src backend/access/heap/heapam.c backend ...

pgsql/src backend/access/heap/heapam.c backend ...

From
Tom Lane
Date:
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    tgl@hub.org    01/01/22 23:32:23

Modified files:
    src/backend/access/heap: heapam.c tuptoaster.c
    src/backend/catalog: aclchk.c heap.c index.c pg_largeobject.c
                         pg_operator.c pg_type.c
    src/backend/commands: async.c comment.c creatinh.c dbcommands.c
                          proclang.c remove.c rename.c trigger.c
                          user.c analyze.c command.c
    src/backend/rewrite: rewriteRemove.c rewriteSupport.c
    src/backend/storage/large_object: inv_api.c
    src/backend/utils/adt: sets.c
    src/include/access: heapam.h

Log message:
    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.