pgsql: amcheck: Report an error when the next page to a leaf is not a l

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: amcheck: Report an error when the next page to a leaf is not a l
Date: 2024-05-22 23:19:55
Message-ID: E1s9vFT-001O9Q-QI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

amcheck: Report an error when the next page to a leaf is not a leaf

This is a very unlikely condition during checking a B-tree unique constraint,
meaning that the index structure is violated badly, and we shouldn't continue
checking to avoid endless loops, etc. So it's worth immediately throwing an
error.

Reported-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAH2-Wzk%2B2116uOXdOViA27SHcr31WKPgmjsxXLBs_aTxAeThzg%40mail.gmail.com
Author: Pavel Borisov

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/97e5b0026fc276ab1bcde58ae98ae1fcd9c3acc3

Modified Files
--------------
contrib/amcheck/verify_nbtree.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2024-05-22 23:35:03 pgsql: Don't copy extended statistics during MERGE/SPLIT partition oper
Previous Message Bruce Momjian 2024-05-22 22:50:59 pgsql: doc PG 17 relnotes: fix pg_stat_reset_shared quoting