Re: amcheck: add index-all-keys-match verification for B-Tree

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Wenbo Lin <linwenbo1994(at)gmail(dot)com>
Subject: Re: amcheck: add index-all-keys-match verification for B-Tree
Date: 2026-11-17 12:53:55
Message-ID: C52AAA9A-CA6B-4B09-BE92-6B75AABF3F01@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 16 Nov 2026, at 16:25, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com> wrote:
>
> @Andrey: if You are happy

100%

While testing the additions, I found a little improvement for v7 EOF check:
ItemPointerGetBlockNumber() is called before validating the TID. With
a zero heap TID offset, even plain bt_index_check() aborts in an
assertion-enabled build. Without assertions, the same case passes
silently.

I think we should check ItemPointerIsValid() and report corruption
before calling the getters.

Thanks!

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nitin Motiani 2026-11-17 12:59:35 Re: [PATCH v1] Fix for bug #19773 : pg_dump differing generation expressions of inherited columns
Previous Message Zhijie Hou 2026-11-17 12:20:00 Re: Document prepared transaction lock waits with two_phase subscriptions