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

Alexander Lakhin <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
Cc: Michael Zhilin <m.zhilin@postgrespro.ru>, pgsql-bugs@postgresql.org, Yura Sokolov <y.sokolov@postgrespro.ru>
Date: 2024-01-26T07:00:00Z
Lists: pgsql-bugs
Hi Andrey,

23.01.2024 21:09, Andrey M. Borodin wrote:
> PFA draft fixes for both this errors. Alexander, Michael, Jian, what do you think?
>
> I did not touch anything in first step - fix for original bug in this thread. However, I think that comments from Jian He worth incorporating into the fix.
>

I''m confused by a NOTICE added, as it printed now even for cases, which
worked before, for example:
CREATE TABLE t(f1 text);
CREATE INDEX idx ON t(f1);
INSERT INTO t VALUES(repeat('1234567890', 1000));
SELECT bt_index_check('idx', true);
NOTICE:  Index contain tuples that cannot fit into index page, if toasted with current toast policy
  bt_index_check
----------------

(1 row)

Best regards,
Alexander



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. amcheck: Use correct varlena size accessor in bt_normalize_tuple()