amcheck: Normalize index tuples containing uncompressed varlena
authorAlexander Korotkov <[email protected]>
Sat, 23 Mar 2024 21:00:06 +0000 (23:00 +0200)
committerAlexander Korotkov <[email protected]>
Sat, 23 Mar 2024 21:03:10 +0000 (23:03 +0200)
commit4e8529da48baf780f2a2c7e0255a0c9ea02b0d11
treef75e091fc3718abdc7d579f6d5a550bd0b13b5f5
parent5df5d9cd7ea4f40f6e3efec650bdc7615b6d16ed
amcheck: Normalize index tuples containing uncompressed varlena

It might happen that the varlena value wasn't compressed by index_form_tuple()
due to current storage parameters.  If compression is currently enabled, we
need to compress such values to match index tuple coming from the heap.

Backpatch to all supported versions.

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