Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Michael Zhilin <m(dot)zhilin(at)postgrespro(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org, y sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Subject: Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum
Date: 2024-01-07 19:00:00
Message-ID: e6d20179-ddbd-3376-a7f5-4831df7d6b60@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello Andrey,

07.01.2024 21:04, Andrey M. Borodin wrote:
>> On 14 Dec 2023, at 21:18, Michael Zhilin <m(dot)zhilin(at)postgrespro(dot)ru> wrote:
> I've checked that:
> * bug is reproduced by the test in the patch
> * bug is fixed by the patch
> * fix seems idiomatic, similar to nearby code
>

What is your opinion regarding similar failures, which are not addressed
by the patch? Besides the case shown above, there is another one:
CREATE TABLE tbl(i int4, t text);
ALTER TABLE tbl ALTER COLUMN t SET STORAGE plain;
CREATE INDEX tbl_idx ON tbl (t, i) WITH (fillfactor = 10);
INSERT INTO tbl SELECT g, repeat('Test', 250) FROM generate_series(1, 130) g;
ALTER TABLE tbl ALTER COLUMN t SET STORAGE extended;

CREATE EXTENSION amcheck;
SELECT bt_index_check('tbl_idx', true);

ERROR:  heap tuple (0,1) from table "tbl" lacks matching index tuple within index "tbl_idx"
HINT:  Retrying verification using the function bt_index_parent_check() might provide a more specific error.

Best regards,
Alexander

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrey M. Borodin 2024-01-07 19:00:40 Re: BUG #18276: Heap-buffer-overflow triggered in src/backend/utils/adt/datum.c:163
Previous Message Andrey M. Borodin 2024-01-07 18:33:56 Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum