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.96) (envelope-from ) id 1wMjFV-000If6-1W for pgsql-bugs@arkaria.postgresql.org; Tue, 12 May 2026 09:17:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wMjFT-0044D6-1A for pgsql-bugs@arkaria.postgresql.org; Tue, 12 May 2026 09:17:55 +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.96) (envelope-from ) id 1wMjFS-0044Co-3A for pgsql-bugs@lists.postgresql.org; Tue, 12 May 2026 09:17:55 +0000 Received: from forwardcorp1a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:df01]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wMjFL-00000000B9n-3pvq for pgsql-bugs@postgresql.org; Tue, 12 May 2026 09:17:53 +0000 Received: from mail-nwsmtp-smtp-corp-main-66.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-66.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:bf1f:0:640:c739:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id 9D454C01DC; Tue, 12 May 2026 12:17:39 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6bf:803e:400:3008:8d89:aaa3:fce8]) by mail-nwsmtp-smtp-corp-main-66.iva.yp-c.yandex.net (smtpcorp) with ESMTPSA id cHG4bU1KFKo0-YfPJzB7z; Tue, 12 May 2026 12:17:39 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1778577459; bh=b6W2G4aAgiCwXTZZUYi2VEVWXku8oG6MhpG5M7/qNWg=; h=Message-Id:To:Date:References:Cc:In-Reply-To:From:Subject; b=OK4SleuzHz6H5gi9m23x6e6yxI+R9+iqPOVG/OmWxp2cgdDlEBdIgC6AubdBpWbkZ d6qVnVw2Jk6GJMiQUzXdd/2ieKUfVrpcs2DtDmQwvwDBhVt0a7O5jwm5sXNUKL0zVY 6o3ECytpeYM/wJAqGBgMjeYps5gU8UjzAyb/sNDY= Authentication-Results: mail-nwsmtp-smtp-corp-main-66.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.500.181\)) Subject: Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum From: Andrey Borodin In-Reply-To: Date: Tue, 12 May 2026 14:17:27 +0500 Cc: Alexander Korotkov , Andres Freund , Alexander Lakhin , Michael Zhilin , pgsql-bugs@postgresql.org, Yura Sokolov Content-Transfer-Encoding: 7bit Message-Id: <06434787-C6A1-4551-A2C3-F86DC892601B@yandex-team.ru> References: <7ckc7oka4bvafkf5bwlqs6ygrhlsbhz25ppozfch7zbuxcx3rf@e4pr4oqenalc> <71E42FAF-FF92-4EE5-94A5-341EFB891281@yandex-team.ru> <13F0EC76-00B9-41D7-8EC3-D1F07FF7C66B@yandex-team.ru> To: Michael Paquier X-Mailer: Apple Mail (2.3864.500.181) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 9 May 2026, at 04:07, Michael Paquier 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. Best regards, Andrey Borodin.