]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix minor 9.4-only bug in logical decoding.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 1 Sep 2016 15:45:16 +0000 (11:45 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 1 Sep 2016 15:45:16 +0000 (11:45 -0400)
commit10ad15f48ab187d754d657892d2f65695a7adea6
tree66636e50e9f3bd18b0d619af6a31809816f5d410
parentf4e40537e1ea3b9c620cb80da97dc56eb088fc4b
Fix minor 9.4-only bug in logical decoding.

The 9.4 version of log_heap_update() stores the full length of the
old_key_tuple in xlhdr.t_len, rather than the length less
offsetof(HeapTupleHeaderData, t_bits) as is customary elsewhere.
DecodeUpdate() was expecting the usual definition, which caused it
to copy 23 bytes too much out of the WAL-file buffer.  Most of the
time that's harmless, although Valgrind on buildfarm member skink
has been complaining about it, and there was one actual SIGSEGV
on curculio that might have been caused by this.  The reconstructed
key tuple would also have an over-length t_len, though offhand
I do not see how that could cause any visible problem.

The problem seems to have disappeared in the 9.5 WAL format changes
(commit 2c03216d8), so we only need to fix 9.4.

Discussion: <11035.1469058247@sss.pgh.pa.us>
src/backend/replication/logical/decode.c