pgsql: Second thoughts on TOAST decompression.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Second thoughts on TOAST decompression.
Date: 2020-11-02 16:25:33
Message-ID: E1kZceD-0004OK-MK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fd2997565c6f66837440dd57f5e52b56aa964d14

Modified Files
--------------
src/common/pg_lzcompress.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-11-02 16:57:36 pgsql: Rethink the generation rule for fmgroids.h macros.
Previous Message Peter Eisentraut 2020-11-02 15:56:52 pgsql: Use PG_GETARG_TRANSACTIONID where appropriate