mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
Fix Xmax freeze conditions
I broke this in 0ac5ad5134; previously, freezing a tuple marked with an IS_MULTI xmax was not necessary. Per brokenness report from Jeff Janes.
This commit is contained in:
@ -5113,10 +5113,11 @@ heap_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
|
|||||||
* cutoff; it doesn't remove dead members of a very old multixact.
|
* cutoff; it doesn't remove dead members of a very old multixact.
|
||||||
*/
|
*/
|
||||||
xid = HeapTupleHeaderGetRawXmax(tuple);
|
xid = HeapTupleHeaderGetRawXmax(tuple);
|
||||||
if (TransactionIdIsNormal(xid) &&
|
if ((tuple->t_infomask & HEAP_XMAX_IS_MULTI) ?
|
||||||
(((!(tuple->t_infomask & HEAP_XMAX_IS_MULTI) &&
|
(MultiXactIdIsValid(xid) &&
|
||||||
TransactionIdPrecedes(xid, cutoff_xid))) ||
|
MultiXactIdPrecedes(xid, cutoff_multi)) :
|
||||||
MultiXactIdPrecedes(xid, cutoff_multi)))
|
(TransactionIdIsNormal(xid) &&
|
||||||
|
TransactionIdPrecedes(xid, cutoff_xid)))
|
||||||
{
|
{
|
||||||
HeapTupleHeaderSetXmax(tuple, InvalidTransactionId);
|
HeapTupleHeaderSetXmax(tuple, InvalidTransactionId);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user