Re: bt_index_parent_check and concurrently build indexes

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Donghang Lin <donghanglin@gmail.com>
Cc: Michail Nikolaev <michail.nikolaev@gmail.com>, "Andrey M. Borodin" <x4mmm@yandex-team.ru>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-03T04:24:10Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. amcheck: Fix snapshot usage in bt_index_parent_check

  2. Teach contrib/amcheck to check the unique constraint violation

On Mon, Jun 02, 2025 at 05:40:18PM -0700, Donghang Lin wrote:
> Your finding is right on point! We recently used bt_index_parent_check to
> verify concurrently built indexes in a concurrent workload,
> bt_index_parent_check often gave such false positive error.

Good thing is that this is tracked in the CF app:
https://commitfest.postgresql.org/patch/5438/

Peter, could you look at that?  amcheck and btree are both in your
area of expertise.  Getting this error because of routine CIC or
REINDEX CONCURRENTLY runs is annoying. 
--
Michael