Second thoughts on TOAST decompression.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: fd2997565c6f66837440dd57f5e52b56aa964d14
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-11-02T16:25:18Z
Releases: 14.0
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.

Files

PathChange+/−
src/common/pg_lzcompress.c modified +9 −8