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 1uwRGt-002Bu0-4O for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Sep 2025 20:18:27 +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 1uwRGq-003PON-Hy for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Sep 2025 20:18:24 +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.94.2) (envelope-from ) id 1uwRGq-003PO2-9L for pgsql-bugs@lists.postgresql.org; Wed, 10 Sep 2025 20:18:24 +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.96) (envelope-from ) id 1uwRGh-00048E-2f for pgsql-bugs@lists.postgresql.org; Wed, 10 Sep 2025 20:18:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 58AKI54b1612098; Wed, 10 Sep 2025 16:18:05 -0400 From: Tom Lane To: feichanghong cc: =?utf-8?B?Iuadjua1t+a0iyjpmYznl5UpIg==?= , ocean_li_996 , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #19040: Memory leak in hashed subplan node due to missing hashtempcxt reset In-reply-to: References: <19040-c9b6073ef814f48c@postgresql.org> <58062871.112.1990d3e06ea.Coremail.ocean_li_996@163.com> <808767.1756913726@sss.pgh.pa.us> <160523.1757190713@sss.pgh.pa.us> <507583.1757352192@sss.pgh.pa.us> <721997.1757364370@sss.pgh.pa.us> <1073615.1757387109@sss.pgh.pa.us> <68ba6c1d-40a8-4aa5-aec1-f0421455bcf5.mohen.lhy@alibaba-inc.com> <1239241.1757456662@sss.pgh.pa.us> <5c051c2d-116f-4613-ba60-029216f534b3.mohen.lhy@alibaba-inc.com> Comments: In-reply-to feichanghong message dated "Wed, 10 Sep 2025 10:32:00 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1612096.1757535485.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 10 Sep 2025 16:18:05 -0400 Message-ID: <1612097.1757535485@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk feichanghong writes: > Thanks for the analysis! v04-0002 looks fine to me =E2=80=94 please just= apply it on > HEAD. Done that way. I thought a bit about your suggestion of adding some kind of assertion check for memory leaks, but it looks too messy and specialized as-is. Maybe with reflection we can find a more generic idea. regards, tom lane