summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2017-07-06 17:20:37 +0300
committerTeodor Sigaev <teodor@sigaev.ru>2017-07-06 17:20:37 +0300
commitb90e4ca3edfd60309e4bc4fcb96e658826a7e20d (patch)
treec5a736b42a9577989e34a409138aa533093583e6
parentfb63a0aa3388430545c7857e72251fc52eb85b1c (diff)
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
-rw-r--r--src/backend/access/heap/heapam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index d5275be5c0a..f6007a436ce 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -5929,7 +5929,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)