pgsql: amcheck: Fix incorrect use of VARATT_IS_COMPRESSED.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: amcheck: Fix incorrect use of VARATT_IS_COMPRESSED.
Date: 2022-06-22 17:14:34
Message-ID: E1o43w1-001IqC-Sr@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

amcheck: Fix incorrect use of VARATT_IS_COMPRESSED.

The macro is being applied to a TOAST pointer, not a varlena header.
Therefore the use of VARATT_IS_COMPRESSED() is wrong. We can check
VARATT_EXTERNAL_IS_COMPRESSED(), but then we don't need the length
check that follows.

Report and fix by Kyotaro Horiguchi.

Discussion: http://postgr.es/m/20220517.162719.1671558681467343711.horikyota.ntt@gmail.com

Branch
------
master

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

Modified Files
--------------
contrib/amcheck/verify_heapam.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2022-06-22 18:33:51 pgsql: doc: clarify wording about phantom reads
Previous Message Tom Lane 2022-06-22 16:12:18 pgsql: Fix SPI's handling of errors during transaction commit.