pgsql: amcheck: Support for different header sizes of short varlena dat

2024-03-23 Thread Alexander Korotkov
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

Branch
--
master

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

Modified Files
--
contrib/amcheck/expected/check_btree.out | 13 
contrib/amcheck/sql/check_btree.sql  | 11 ++
contrib/amcheck/verify_nbtree.c  | 36 +++-
3 files changed, 55 insertions(+), 5 deletions(-)



pgsql: amcheck: Support for different header sizes of short varlena dat

2024-03-23 Thread Alexander Korotkov
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

Branch
--
REL_16_STABLE

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

Modified Files
--
contrib/amcheck/expected/check_btree.out | 13 
contrib/amcheck/sql/check_btree.sql  | 11 ++
contrib/amcheck/verify_nbtree.c  | 36 +++-
3 files changed, 55 insertions(+), 5 deletions(-)



pgsql: amcheck: Support for different header sizes of short varlena dat

2024-03-23 Thread Alexander Korotkov
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

Branch
--
REL_15_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/54e6184db3613e868ca7f042aebe69393fd73b96

Modified Files
--
contrib/amcheck/expected/check_btree.out | 13 
contrib/amcheck/sql/check_btree.sql  | 11 ++
contrib/amcheck/verify_nbtree.c  | 36 +++-
3 files changed, 55 insertions(+), 5 deletions(-)



pgsql: amcheck: Support for different header sizes of short varlena dat

2024-03-23 Thread Alexander Korotkov
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

Branch
--
REL_13_STABLE

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

Modified Files
--
contrib/amcheck/expected/check_btree.out | 13 
contrib/amcheck/sql/check_btree.sql  | 11 ++
contrib/amcheck/verify_nbtree.c  | 36 +++-
3 files changed, 55 insertions(+), 5 deletions(-)



pgsql: amcheck: Support for different header sizes of short varlena dat

2024-03-23 Thread Alexander Korotkov
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

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/50f8611d073e255c9d5b3792965595879c22c610

Modified Files
--
contrib/amcheck/expected/check_btree.out | 13 
contrib/amcheck/sql/check_btree.sql  | 11 ++
contrib/amcheck/verify_nbtree.c  | 36 +++-
3 files changed, 55 insertions(+), 5 deletions(-)



pgsql: amcheck: Support for different header sizes of short varlena dat

2024-03-23 Thread Alexander Korotkov
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

Branch
--
REL_14_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/5df5d9cd7ea4f40f6e3efec650bdc7615b6d16ed

Modified Files
--
contrib/amcheck/expected/check_btree.out | 13 
contrib/amcheck/sql/check_btree.sql  | 11 ++
contrib/amcheck/verify_nbtree.c  | 36 +++-
3 files changed, 55 insertions(+), 5 deletions(-)