summaryrefslogtreecommitdiff
path: root/contrib/pageinspect/hashfuncs.c
diff options
context:
space:
mode:
authorAndres Freund2018-05-01 20:30:12 +0000
committerAndres Freund2018-05-01 20:30:12 +0000
commit1667148a4dd98cea28b8b53d57dbc1eece1b0b5c (patch)
treefafd722d80402315d3ff7c281cdf9d3e39bdead3 /contrib/pageinspect/hashfuncs.c
parent37a3058bc7c8224d4c0d8b36176d821636a1f90e (diff)
Improve representation of 'moved partitions' indicator on deleted tuples.
Previously a tuple that has been moved to a different partition (see f16241bef7c), set the block number on the old tuple to an invalid value to indicate that fact. But the tuple offset was left untouched. That turned out to trigger a wal_consistency_checking failure as reported by Peter Geoghegan, as the offset wasn't always overwritten during WAL replay. Heikki observed that we're wasting valuable data by not putting information also in the offset. Thus set that to MovedPartitionsOffsetNumber when a tuple indicates it has moved. We continue to set the block number to MovedPartitionsBlockNumber, as that seems more likely to cause problems for code not updated to know about moved tuples. As t_ctid's offset number is now always set, this refinement also fixes the wal_consistency_checking issue. This technically is a minor disk format break, with previously created moved tuples not being recognized anymore. But since there not even has been a beta release since f16241bef7c... Reported-By: Peter Geoghegan Author: Heikki Linnakangas, Amul Sul Discussion: https://postgr.es/m/CAH2-Wzm9ty+1BX7-GMNJ=xPRg67oJTVeDNdA9LSyJJtMgRiCMA@mail.gmail.com
Diffstat (limited to 'contrib/pageinspect/hashfuncs.c')
0 files changed, 0 insertions, 0 deletions