amcheck: Support for different header sizes of short varlena datum
authorAlexander Korotkov <[email protected]>
Sat, 23 Mar 2024 20:59:56 +0000 (22:59 +0200)
committerAlexander Korotkov <[email protected]>
Sat, 23 Mar 2024 21:02:30 +0000 (23:02 +0200)
commita6ddb8ad0ad0947bf86e8cd99c87b156f0956228
treefd12e31a364b48c106ea66412798b8fb04faf02f
parent14e991db89b1e0fd39e8875b80da7f0b0c3533a4
amcheck: Support for different header sizes of short varlena datum

In the heap, tuples may contain short varlena datum with both 1B header and 4B
headers.  But the corresponding index tuple should always have such varlena's
with 1B headers.  So, for fingerprinting, we need to convert.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/flat/7bdbe559-d61a-4ae4-a6e1-48abdf3024cc%40postgrespro.ru
Author: Michael Zhilin
Reviewed-by: Alexander Lakhin, Andrey Borodin, Jian He, Alexander Korotkov
Backpatch-through: 12
contrib/amcheck/expected/check_btree.out
contrib/amcheck/sql/check_btree.sql
contrib/amcheck/verify_nbtree.c