pgsql: Use TransactionXmin instead of RecentGlobalXmin in heap_abort_sp

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Use TransactionXmin instead of RecentGlobalXmin in heap_abort_sp
Дата
Msg-id E1jLGEP-0002Gn-H7@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Use TransactionXmin instead of RecentGlobalXmin in heap_abort_speculative().

There's a very low risk that RecentGlobalXmin could be far enough in
the past to be older than relfrozenxid, or even wrapped
around. Luckily the consequences of that having happened wouldn't be
too bad - the page wouldn't be pruned for a while.

Avoid that risk by using TransactionXmin instead. As that's announced
via MyPgXact->xmin, it is protected against wrapping around (see code
comments for details around relfrozenxid).

Author: Andres Freund
Discussion: https://postgr.es/m/20200328213023.s4eyijhdosuc4vcj@alap3.anarazel.de
Backpatch: 9.5-

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f7f55d02c2a1e854f21cde4124453c2b247b701f

Modified Files
--------------
src/backend/access/heap/heapam.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Use TransactionXmin instead of RecentGlobalXmin in heap_abort_sp
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Use TransactionXmin instead of RecentGlobalXmin in heap_abort_sp