Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rS4Ez-00BApx-KY for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jan 2024 00:02:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rS4E0-007m1K-Az for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jan 2024 00:01:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rS4E0-007m1C-2G for pgsql-bugs@lists.postgresql.org; Tue, 23 Jan 2024 00:01:08 +0000 Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rS4Du-002s0l-TZ for pgsql-bugs@postgresql.org; Tue, 23 Jan 2024 00:01:06 +0000 Received: by mail-ua1-x92b.google.com with SMTP id a1e0cc1a2514c-7d2e16b552dso718380241.1 for ; Mon, 22 Jan 2024 16:01:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705968062; x=1706572862; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fg9U5G4PltpEQBfqo1bmagNIVNc/uWR/PVd16sMjef8=; b=e6AhHD+HJeeghvkdahtoTMqpm568zyot/5TIyYAeL7Dumh1P1bDZJ5tVc5oTXGU3Tr bngZouLIwaLEvETm4CbhoAksRglPk1+KfUoBSc5lXhm+YDymRnpJxcEp75p8IR/psNLE fWI28vWwf4CaBrUeZ2Qg5dyVU2DeDCgYMqOxPnfHRQEHaQkRqv7mTOf4IXNXDmGc8CCj sziIw7PqJ89Q8qawT8nW+2pGyWuzvam3ZwX7z/iqvalwBUtXxPXdyru2rVw9BelyBEub wB/C0NyeLJ79aythO3z4NXOHZjY4TAB62Uy0S2fTNOocOepySVd9k1kfZBUQSPMGb4hz EKtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705968062; x=1706572862; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fg9U5G4PltpEQBfqo1bmagNIVNc/uWR/PVd16sMjef8=; b=Ysvpn0byXN/pMLApxOpGXtg/TrdGYT7PqufOrrmWd0NZDSXsKx83lQadd3nUukHA18 31Mh6ObETiq454tUsne9I58xoxF8QfnrNID1XM0Q6djw2Nf5+Mvy3bS6GfjLPlTIy+Gb hGR0HQmRWWpOXZicJNTI1phIBk8JzqhKHFPUPvbFl5/Hw1leO7V3VQnZS4lQIFmcoGGM L3vlNYYiAxL+hG6CyW/sME8jLt/YwrwECt1vZLoemTTWTJ8dK8ubfQir/nnTcnn4TuID DXSmG6k0ZlQcFJuoB6mOmzKgGoS7KrNVndq8eFaTmVAMd5S5O6DouNTYSRP9D+BvMZOM F+0Q== X-Gm-Message-State: AOJu0Yy6RkBp2oqfjvWPVjFNpODtgg3/mlEtaNWWgkySuD/pJKn/5q49 1Rj5T/upo3/E2MLW+PcOSN+0pqhixAP7B9sbaXffa/EYuURxNXwzS7fnrOAzNAYK4d4xTcrcUM6 KoOCPTAHy/5HbEVw1tH8Fj01vOdM= X-Google-Smtp-Source: AGHT+IHmiv1IndODGN55N3nzcW1bYzmllGoRXec7LDWtMokTN7dsRu3VrsyY9YmqffkVvRqTC8rOkMDQLF4LXhBdVcw= X-Received: by 2002:a67:fc0d:0:b0:469:aa3c:ca60 with SMTP id o13-20020a67fc0d000000b00469aa3cca60mr2101486vsq.9.1705968060470; Mon, 22 Jan 2024 16:01:00 -0800 (PST) MIME-Version: 1.0 References: <7bdbe559-d61a-4ae4-a6e1-48abdf3024cc@postgrespro.ru> <0FDE2089-D306-4CBB-AD1F-EC4B419E3B33@yandex-team.ru> <49BBA065-4C9A-4E50-9048-B457907FF219@yandex-team.ru> <76bc0dc9-4e43-4cd8-8eec-249b254ed1c9@postgrespro.ru> In-Reply-To: <76bc0dc9-4e43-4cd8-8eec-249b254ed1c9@postgrespro.ru> From: jian he Date: Tue, 23 Jan 2024 08:00:00 +0800 Message-ID: Subject: Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum To: Michael Zhilin Cc: "Andrey M. Borodin" , Alexander Lakhin , pgsql-bugs@postgresql.org, y sokolov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 10, 2024 at 1:59=E2=80=AFAM Michael Zhilin 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.