Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gj5Sl-0006yC-5G for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Jan 2019 16:51:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gj5Rh-0003lb-Vc for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Jan 2019 16:50:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gj5Rh-0003kD-Pa for pgsql-bugs@lists.postgresql.org; Mon, 14 Jan 2019 16:50:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gj5Rb-0002tb-LG for pgsql-bugs@lists.postgresql.org; Mon, 14 Jan 2019 16:50:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x0EGoR9W027373; Mon, 14 Jan 2019 11:50:27 -0500 From: Tom Lane To: Andres Freund cc: pgsql-bugs@lists.postgresql.org, amdmi3@amdmi3.ru Subject: Re: BUG #15592: Memory overuse with subquery containing unnest() and set operations (11.x regression) In-reply-to: <3935CFAF-8FD4-459E-B13F-67DFEE852028@anarazel.de> References: <15592-cc5729f9ba02e31c@postgresql.org> <26375.1547483080@sss.pgh.pa.us> <3935CFAF-8FD4-459E-B13F-67DFEE852028@anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 14 Jan 2019 08:39:21 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27371.1547484627.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 14 Jan 2019 11:50:27 -0500 Message-ID: <27372.1547484627@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On January 14, 2019 8:24:40 AM PST, Tom Lane wrote: >> Ugh. Something is creating ExprContexts and not freeing them --- a >> memory context dump taken at ExecutorEnd shows > Think I know where the problem is - let me have a coffee and check? I th= ink I might have a good lying around... I had just determined that the extra context was added by bf6c614a2, which at this point has accumulated a pretty serious collection of bugs, judging by subsequent mentions in the commit log. I'm inclined to think that entire patch needs review. regards, tom lane