Second thoughts on TOAST decompression.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 2 Nov 2020 16:25:18 +0000 (11:25 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 2 Nov 2020 16:25:18 +0000 (11:25 -0500)
commitfd2997565c6f66837440dd57f5e52b56aa964d14
treeaa417a059a8475acc981725fcea150d328b27d3f
parentdd26a0ad760b11237d7ea9cda8ccccc1826c2c64
Second thoughts on TOAST decompression.

On detecting a corrupted match tag, pglz_decompress() should just
summarily return -1.  Breaking out of the loop, as I did in dfc797730,
doesn't quite guarantee that will happen.  Also, we can use
unlikely() on that check, just in case it helps.

Backpatch to v13, like the previous patch.
src/common/pg_lzcompress.c