Re: bt_index_parent_check and concurrently build indexes
Donghang Lin <donghanglin@gmail.com>
From: Donghang Lin <donghanglin@gmail.com>
To: Michail Nikolaev <michail.nikolaev@gmail.com>
Cc: "Andrey M. Borodin" <x4mmm@yandex-team.ru>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-03T00:40:18Z
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 →
-
amcheck: Fix snapshot usage in bt_index_parent_check
- e1a327dc4dcb 17.8 landed
- dcddd6987197 15.16 landed
- 607a67c5e657 14.21 landed
- 3c83a2a0ace9 18.2 landed
- 1f28982e4094 19 (unreleased) landed
- 098a1fab8a9b 16.12 landed
- df93f94dda51 18.2 landed
- ce2f575b7cf4 17.8 landed
- 6bd469d26aca 19 (unreleased) landed
-
Teach contrib/amcheck to check the unique constraint violation
- 5ae2087202af 17.0 cited
Hi Michail > It turns out that bt_index_parent_check is not suitable for validating indexes built concurrently. 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. - indexinfo->ii_Concurrent = !state->readonly; + indexinfo->ii_Concurrent = true; One suggestion to this change is that we might need to update the amcheck doc to reflect that "This consists of a “dummy” CREATE INDEX CONCURRENTLY operation" rather than "CREATE INDEX" operation. Regards, Donghang