]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix amcheck's handling of half-dead B-tree pages
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 2 Dec 2025 19:11:15 +0000 (21:11 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 2 Dec 2025 19:15:04 +0000 (21:15 +0200)
commit19e786727c4f3415fc29965677afdc909c50786e
tree3f28122ba06f2dcb8d51b301e31b81b8aaf6a5ea
parent50c63ebb05fc850010f571441b0349414e21c87f
Fix amcheck's handling of half-dead B-tree pages

amcheck incorrectly reported the following error if there were any
half-dead pages in the index:

ERROR:  mismatch between parent key and child high key in index
"amchecktest_id_idx"

It's expected that a half-dead page does not have a downlink in the
parent level, so skip the test.

Reported-by: Konstantin Knizhnik <knizhnik@garret.ru>
Reviewed-by: Peter Geoghegan <pg@bowt.ie>
Reviewed-by: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
Discussion: https://www.postgresql.org/message-id/33e39552-6a2a-46f3-8b34-3f9f8004451f@garret.ru
Backpatch-through: 14
contrib/amcheck/verify_nbtree.c