]> granicus.if.org Git - postgresql/commit
Don't TransactionIdDidAbort in HeapTupleGetUpdateXid
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 29 Nov 2013 19:08:06 +0000 (16:08 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sat, 30 Nov 2013 00:47:21 +0000 (21:47 -0300)
commit1ce150b7bb14105ddc190c5f1acf2ae1a9b2854a
treedd072a896cb56b945a500c9ce1e5dfff8bd1d954
parent1df0122daa6510eed4146033379a5055f66f5a8e
Don't TransactionIdDidAbort in HeapTupleGetUpdateXid

It is dangerous to do so, because some code expects to be able to see what's
the true Xmax even if it is aborted (particularly while traversing HOT
chains).  So don't do it, and instead rely on the callers to verify for
abortedness, if necessary.

Several race conditions and bugs fixed in the process.  One isolation test
changes the expected output due to these.

This also reverts commit c235a6a589b, which is no longer necessary.

Backpatch to 9.3, where this function was introduced.

Andres Freund
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/utils/time/tqual.c
src/test/isolation/expected/delete-abort-savept.out