Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1opfOJ-00039Y-Pq for pgsql-bugs@arkaria.postgresql.org; Tue, 01 Nov 2022 00:44:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1opfOI-0000c2-80 for pgsql-bugs@arkaria.postgresql.org; Tue, 01 Nov 2022 00:44:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1opfOH-0000bs-Vy for pgsql-bugs@lists.postgresql.org; Tue, 01 Nov 2022 00:44:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1opfOF-0000ia-Py for pgsql-bugs@lists.postgresql.org; Tue, 01 Nov 2022 00:44:28 +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 2A10i9Kb1046180; Mon, 31 Oct 2022 20:44:09 -0400 From: Tom Lane To: David Rowley cc: Andres Freund , lauri.laanmets@eesti.ee, pgsql-bugs@lists.postgresql.org Subject: Re: Memory leak on subquery as scalar operand In-reply-to: References: Comments: In-reply-to David Rowley message dated "Tue, 01 Nov 2022 12:20:38 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1046178.1667263449.1@sss.pgh.pa.us> Date: Mon, 31 Oct 2022 20:44:09 -0400 Message-ID: <1046179.1667263449@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > Does it still OOM if you do: > SET jit TO off; ? Ah, bingo --- I can reproduce the behavior if I use a JIT-enabled build. So this is related to the known problems with leakage of compiled objects. It's pretty odd though that it requires two sub-selects to cause the problem. regards, tom lane