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

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Michael Zhilin <m(dot)zhilin(at)postgrespro(dot)ru>
Cc: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Alexander Lakhin <exclusion(at)gmail(dot)com>, 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-23 00:00:00
Message-ID: CACJufxFZcOTrq-NpFs7wErSh2KX4KePD7MuiF6d_h4nD=OJJKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Jan 10, 2024 at 1:59 AM Michael Zhilin <m(dot)zhilin(at)postgrespro(dot)ru> wrote:
>
> Hi,
>
> Thank you, Andrey, for review and advice!
>
> Here is rebased version (v2) of patch supposed to make CF bot happy.

Hi

+--
+-- BUG: must support different header size of short varlena datum
+--
+
+CREATE TABLE varlena_bug (v text);
+ALTER TABLE varlena_bug ALTER column v SET storage plain;
+INSERT INTO varlena_bug VALUES ('x');
+\set filename :abs_builddir '/results/varlena_bug.dmp'
+COPY varlena_bug TO :'filename';
+COPY varlena_bug FROM :'filename';
+CREATE INDEX varlena_bug_idx on varlena_bug(v);
+SELECT bt_index_check('varlena_bug_idx', true);

you can simply replace
+\set filename :abs_builddir '/results/varlena_bug.dmp'
+COPY varlena_bug TO :'filename';
+COPY varlena_bug FROM :'filename';

with

COPY varlena_bug from stdin;
x
\.

In the comments, adding the postgres link
(https://postgr.es/m/7bdbe559-d61a-4ae4-a6e1-48abdf3024cc@postgrespro.ru)
would be great.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2024-01-23 01:15:27 Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit
Previous Message Michael Paquier 2024-01-22 23:38:09 Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit