amcheck: Fix incorrect use of VARATT_IS_COMPRESSED.
authorRobert Haas <[email protected]>
Wed, 22 Jun 2022 17:11:49 +0000 (13:11 -0400)
committerRobert Haas <[email protected]>
Wed, 22 Jun 2022 17:11:49 +0000 (13:11 -0400)
commite243de03fb4583dd4a9f0afb41493727d7946c02
treedf9210bae2d7ac6746952a14701fe91505252cb9
parent9f0b953457012a41321ab62cffa6aeabcb6e99b2
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[email protected]
contrib/amcheck/verify_heapam.c