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 1h60MI-0000nX-8F for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 22:03:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h60MG-0008PX-RD for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 22:03:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h60MG-0008PQ-HI for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 22:03:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h60ME-0000s2-2s for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 22:03:47 +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 x2IM3ec7006062; Mon, 18 Mar 2019 18:03:40 -0400 From: Tom Lane To: Andres Freund cc: Jeff Janes , Matthias Otterbach , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15700: PG 10 vs. 11: Large increase in memory usage when selecting BYTEA data (maybe memory leak) In-reply-to: <20190318215710.f6balpny456kink2@alap3.anarazel.de> References: <15700-8c408321a87d56bb@postgresql.org> <16717.1552926811@sss.pgh.pa.us> <4ef5f38d5710c4d5c289537c588c7335@otterbach.eu> <13467.1552942521@sss.pgh.pa.us> <20190318215710.f6balpny456kink2@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 18 Mar 2019 14:57:10 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6060.1552946620.1@sss.pgh.pa.us> Date: Mon, 18 Mar 2019 18:03:40 -0400 Message-ID: <6061.1552946620@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > But are we actually prepared to assume that nothing ever leaks in > receivers? That's, as far as I can tell, not a documented > assumption. There's a lot that's not documented there :-( > We're also assuming that we don't leak into MessageContext over such > cycles, which seems wrong. At the very least things like > errdetail_params() are happy to leak into MessageContext. This leak isn't in MessageContext; if it were, there likely wouldn't have been a noticeable problem. It's leaking in the executor's context over repeat ExecutorRun cycles in the same execution state. We do have an expectation that there won't be per-row leakage in the ExecutorState. regards, tom lane