pgsql: Don't TransactionIdDidAbort in HeapTupleGetUpdateXid

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Don't TransactionIdDidAbort in HeapTupleGetUpdateXid
Дата
Msg-id E1VmZ0b-0008HV-Ke@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/663d2e485e4d526770ab618469d875c404714119

Modified Files
--------------
src/backend/access/heap/heapam.c                   |   21 +++--
src/backend/access/heap/pruneheap.c                |   22 ++---
src/backend/utils/time/tqual.c                     |   93 +++++++++++---------
.../isolation/expected/delete-abort-savept.out     |   13 +--
4 files changed, 75 insertions(+), 74 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Truncate pg_multixact/'s contents during crash recovery
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Truncate pg_multixact/'s contents during crash recovery