]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Make HEAP_LOCK/HEAP2_LOCK_UPDATED replay reset HEAP_XMAX_INVALID.
authorAndres Freund <andres@anarazel.de>
Fri, 15 Jul 2016 21:37:06 +0000 (14:37 -0700)
committerAndres Freund <andres@anarazel.de>
Fri, 15 Jul 2016 21:51:03 +0000 (14:51 -0700)
commit46acbeb2f09c862bae5056d34473223764ff99b0
treec1d2cd7aa00a840e5c0ad730efb9d6a11bca9330
parent6c243f90ab6904f27fa990f1f3261e1d09a11853
Make HEAP_LOCK/HEAP2_LOCK_UPDATED replay reset HEAP_XMAX_INVALID.

0ac5ad5 started to compress infomask bits in WAL records. Unfortunately
the replay routines for XLOG_HEAP_LOCK/XLOG_HEAP2_LOCK_UPDATED forgot to
reset the HEAP_XMAX_INVALID (and some other) hint bits.

Luckily that's not problematic in the majority of cases, because after a
crash/on a standby row locks aren't meaningful. Unfortunately that does
not hold true in the presence of prepared transactions. This means that
after a crash, or after promotion, row level locks held by a prepared,
but not yet committed, prepared transaction might not be enforced.

Discussion: 20160715192319.ubfuzim4zv3rqnxv@alap3.anarazel.de
Backpatch: 9.3, the oldest branch on which 0ac5ad5 is present.
src/backend/access/heap/heapam.c