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 1wfeHx-005Ynq-1E for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Jul 2026 13:50:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wfeHw-007d59-0p for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Jul 2026 13:50:40 +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 1wfeHv-007d51-37 for pgsql-bugs@lists.postgresql.org; Fri, 03 Jul 2026 13:50:39 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wfeHu-00000001Jet-0V0p for pgsql-bugs@postgresql.org; Fri, 03 Jul 2026 13:50:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 663DoUlK3854291; Fri, 3 Jul 2026 09:50:30 -0400 From: Tom Lane To: Ayush Tiwari cc: =?UTF-8?B?546L6LeD5p6X?= , pgsql-bugs , 3764353996 <3764353996@qq.com> Subject: Re: Fw:Re: Fw: gbt_var_consistent in contrib/btree_gist/btree_utils_var.c has internal-node type confusion on the <> strategy, bypassing exclusion constraints In-reply-to: References: <3748108.1783003096@sss.pgh.pa.us> <3756776.1783011257@sss.pgh.pa.us> <3793780.1783033337@sss.pgh.pa.us> Comments: In-reply-to Ayush Tiwari message dated "Fri, 03 Jul 2026 14:10:44 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3854289.1783086630.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 03 Jul 2026 09:50:30 -0400 Message-ID: <3854290.1783086630@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ayush Tiwari writes: > Are you planning on including it in the backpatch or to keep the > optimization just part of master, and the bug fix backpatched? I was intending to back-patch only the bug fixes, ie 0002 and 0003. If we make additional cosmetic changes to gbt_var_consistent(), I could go either way on whether to include those in the back-patch. BTW, thinking some more about 0004: isn't it pointless to check gbt_var_node_pf_match in the gbt_var_consistent cases that only constrain the lower bound, that is LessEqual and Less? In retval =3D tinfo->f_cmp(query, key->lower, collation, flin= fo) >=3D 0 || gbt_var_node_pf_match(key, query, tinfo); if query >=3D key->lower then we must search the node, but if it isn't then the prefix match against upper can't succeed either. regards, tom lane