Fix amcheck's handling of incomplete root splits in B-tree
authorHeikki Linnakangas <[email protected]>
Tue, 2 Dec 2025 19:10:51 +0000 (21:10 +0200)
committerHeikki Linnakangas <[email protected]>
Tue, 2 Dec 2025 19:10:51 +0000 (21:10 +0200)
commit6c05ef5729c04d47400660cd994305bc44a3c757
treeb4c69fd04004c212b5ba6e88dbcd4ebd58140923
parent1e4e5783e7d77adb283ae7fa1ac99b0910a041b2
Fix amcheck's handling of incomplete root splits in B-tree

When the root page is being split, it's normal that root page
according to the metapage is not marked BTP_ROOT. Fix bogus error in
amcheck about that case.

Reviewed-by: Peter Geoghegan <[email protected]>
Discussion: https://www.postgresql.org/message-id/abd65090-5336-42cc-b768-2bdd66738404@iki.fi
Backpatch-through: 14
contrib/amcheck/verify_nbtree.c
src/test/modules/nbtree/Makefile
src/test/modules/nbtree/expected/nbtree_incomplete_splits.out
src/test/modules/nbtree/sql/nbtree_incomplete_splits.sql