Re: bt_index_parent_check and concurrently build indexes - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: bt_index_parent_check and concurrently build indexes
Date
Msg-id 202512051022.v256jprxxclf@alvherre.pgsql
Whole thread Raw
In response to Re: bt_index_parent_check and concurrently build indexes  (Donghang Lin <donghanglin@gmail.com>)
List pgsql-hackers
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/

Attachment

pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM
Next
From: Heikki Linnakangas
Date:
Subject: Re: libpq: Process buffered SSL read bytes to support records >8kB on async API