amcheck: Normalize index tuples containing uncompressed varlena
authorAlexander Korotkov <akorotkov@postgresql.org>
Sat, 23 Mar 2024 21:00:06 +0000 (23:00 +0200)
committerAlexander Korotkov <akorotkov@postgresql.org>
Sat, 23 Mar 2024 22:09:24 +0000 (00:09 +0200)
commitb1fe8efdf17eb4877f7c4c31c85111ec740ad872
tree55afca0e745522a0abb804b71fc541cb783da0ac
parentab65dfb0fb2908989c0ef3330464b7af171e9728
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