postgresql/contrib/amcheck
Peter Geoghegan aac80bfcdd Fix amcheck child check pg_upgrade bug.
Commit d114cc53 overlooked the fact that pg_upgrade'd B-Tree indexes
have leaf page high keys whose offset numbers do not match the one from
the copy of the tuple one level up (the copy stored with a downlink for
leaf page's right sibling page).  This led to false positive reports of
corruption from bt_index_parent_check() when it was called to verify a
pg_upgrade'd index.

To fix, skip comparing the offset number on pg_upgrade'd B-Tree indexes.

Author: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
Author: Peter Geoghegan <pg@bowt.ie>
Reported-By: Andrew Bille <andrewbille@gmail.com>
Diagnosed-By: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
Bug: #16619
Discussion: https://postgr.es/m/16619-aaba10f83fdc1c3c@postgresql.org
Backpatch: 13-, where child check was enhanced.
2020-09-16 10:42:30 -07:00
..
expected Restore lost amcheck TOAST test coverage. 2020-07-31 15:34:28 -07:00
sql Restore lost amcheck TOAST test coverage. 2020-07-31 15:34:28 -07:00
.gitignore
amcheck--1.0--1.1.sql
amcheck--1.0.sql
amcheck--1.1--1.2.sql
amcheck.control
Makefile
verify_nbtree.c Fix amcheck child check pg_upgrade bug. 2020-09-16 10:42:30 -07:00