1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-31 03:21:24 +03:00

Fix potential data corruption during freeze

Fix oversight in 3b97e6823b94 bug fix. Bitwise AND is used instead of OR and
it cleans all bits in t_infomask heap tuple field.

Backpatch to 9.3
This commit is contained in:
Teodor Sigaev 2017-07-06 17:20:56 +03:00
parent 543e00bc1f
commit f371cc9e9f

View File

@ -5737,7 +5737,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
frz->t_infomask &= ~HEAP_XMAX_BITS;
frz->xmax = newxmax;
if (flags & FRM_MARK_COMMITTED)
frz->t_infomask &= HEAP_XMAX_COMMITTED;
frz->t_infomask |= HEAP_XMAX_COMMITTED;
changed = true;
}
else if (flags & FRM_RETURN_IS_MULTI)