pgsql: Fix amcheck's handling of half-dead B-tree pages - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix amcheck's handling of half-dead B-tree pages
Date
Msg-id E1vQW1e-002Tc4-2J@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

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

Modified Files
--------------
contrib/amcheck/verify_nbtree.c                            |  2 +-
.../modules/nbtree/expected/nbtree_half_dead_pages.out     | 14 ++++++++++++++
src/test/modules/nbtree/sql/nbtree_half_dead_pages.sql     |  5 +++++
3 files changed, 20 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Nathan Bossart
Date:
Subject: pgsql: Show size of DSAs and dshashes in pg_dsm_registry_allocations.
Next
From: Nathan Bossart
Date:
Subject: pgsql: Use LW_SHARED in dsa.c where possible.