]> 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:48:18 +0000 (21:48 -0300)
commit663d2e485e4d526770ab618469d875c404714119
tree4d197b8235e25c3dcffa0b17779175f6ca45920e
parent215ac4ad6589e0f6a31cc4cd867aedba3cd42924
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