Re: bt_index_parent_check and concurrently build indexes
Álvaro Herrera <alvherre@kurilemu.de>
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Donghang Lin <donghanglin@gmail.com>
Cc: Mihail Nikalayeu <mihailnikalayeu@gmail.com>, Peter Geoghegan <pg@bowt.ie>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Andrey Borodin <amborodin86@gmail.com>, Matthias van de Meent <boekewurm+postgres@gmail.com>
Date: 2025-12-05T10:44: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 →
-
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
Attachments
Hello, On 2025-Dec-04, Donghang Lin wrote: > Hi Álvaro, > > Thanks for looking at it. The test in the commit still fails back to 14. > I think it should be backported to 14 and up. You're correct that the bug is older. I'm not sure about backporting the fix to 16 and earlier though, because it depends on BtreeCheckState having the snapshot member which was only added in commit 5ae2087202af. It's not a difficult patch -- attached. I was being cautious and under the impression that the bug had never been actually encountered by users, but I just noticed that in your reply from 2 Jun 2025 you mentioned hitting this problem. So maybe we should bite the bullet ... Is anybody against backpatching this to 14-16? (One thing I realized is that the comment for BtreeCheckState->snapshot says that it's used for the uniqueness test only, but that's no longer the case. So that needs fixed ...) -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/