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 1wRdc7-002Xkb-2j for pgsql-bugs@arkaria.postgresql.org; Mon, 25 May 2026 22:17:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRdc5-002En9-0r for pgsql-bugs@arkaria.postgresql.org; Mon, 25 May 2026 22:17:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wRdc5-002Emy-06 for pgsql-bugs@lists.postgresql.org; Mon, 25 May 2026 22:17:33 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wRdc4-00000001Q5j-02Z5 for pgsql-bugs@lists.postgresql.org; Mon, 25 May 2026 22:17:33 +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 64PMHPGY210877; Mon, 25 May 2026 18:17:26 -0400 From: Tom Lane To: "=?gb18030?B?emVuZ21hbg==?=" cc: "=?gb18030?B?cGdzcWwtYnVncw==?=" Subject: Re: BUG #19492: intarray: fix variable stats leak in _int_matchsel In-reply-to: References: <19492-ddcd0e22399ef85a@postgresql.org> Comments: In-reply-to "=?gb18030?B?emVuZ21hbg==?=" message dated "Sun, 24 May 2026 13:15:43 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <210875.1779747445.1@sss.pgh.pa.us> Date: Mon, 25 May 2026 18:17:25 -0400 Message-ID: <210876.1779747445@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "=?gb18030?B?emVuZ21hbg==?=" writes: > Patch attached. Also added a test case that exercises this code path > by creating a text operator with _int_matchsel as the restriction > estimator. Good catch, pushed. I didn't bother with the test case though --- none of the other early exits in that function have test cases, and I don't see why this one is any more fragile than the others. regards, tom lane