Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum - Mailing list pgsql-bugs

From Andrey Borodin
Subject Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum
Date
Msg-id 405E8B45-0D6B-48AC-97F9-38C6B08766F7@yandex-team.ru
Whole thread
In response to Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum  (Alexander Lakhin <exclusion@gmail.com>)
Responses Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum
List pgsql-bugs

> On 12 May 2026, at 13:22, Alexander Korotkov <aekorotkov@gmail.com> wrote:
>
> On Tue, May 12, 2026 at 12:17 PM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>>> On 9 May 2026, at 04:07, Michael Paquier <michael@paquier.xyz> wrote:
>>>
>>> On Mon, May 04, 2026 at 10:20:04AM +0500, Andrey Borodin wrote:
>>>> However, I'd like to note that (VARSIZE_1B() < TOAST_INDEX_TARGET) is
>>>> constantly true for 8Kb+ pages.
>>>
>>> How much slower?  I cannot imagine that it matters much in this code
>>> path, but you are getting me worried.
>>
>>
>> I think there will be no performance difference.
>>
>> Change proposed by Alexander only prevents use of VARSIZE() against datum
>> that is VARSIZE_1B. AFAICS no actual behavior would change.
>>
>> On some occasions we would have to normilize less tuples.
>
> Any objections if I push and backpatch this?

Kind reminder, let's resolve this thread. Thank you!


Best regards, Andrey Borodin.


pgsql-bugs by date:

Previous
From: Fujii Masao
Date:
Subject: Re: BUG #18876: HINT messages for mxid wrap-around say "drop stale slots", but that may not be appropriate
Next
From: Etsuro Fujita
Date:
Subject: Re: BUG #19484: Segmentation fault triggered by FDW