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 1h5vCl-00005p-Vh for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 16:33:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5vCk-0004dI-7Y for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 16:33:38 +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 1h5vCj-0004dB-Pv for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 16:33:37 +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 1h5vCg-0001lT-Kb for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 16:33:36 +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 x2IGXVdL016718; Mon, 18 Mar 2019 12:33:31 -0400 From: Tom Lane To: mo@otterbach.eu cc: 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: <15700-8c408321a87d56bb@postgresql.org> References: <15700-8c408321a87d56bb@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 18 Mar 2019 09:44:34 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16716.1552926811.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 18 Mar 2019 12:33:31 -0400 Message-ID: <16717.1552926811@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > [ apparent backend memory leak when processing wide rows ] FWIW, I tried to reproduce this without success, on both HEAD and v11 branch tip. It's possible that this is a bug somebody fixed since 11.2, but I see no mention of relevant memory leaks in the commit log. Still, it's hard to interpret this: > ExecutorState: 4294976384 total in 17 blocks; 4080 free (0 chunks)= ; > 4294972304 used as anything but a leak in ExecutorState. For comparison, when I try this same example here, I get a fairly steady value of ExecutorState: 134225984 total in 2 blocks; 5144 free (1 chunks); 13= 4220840 used > I know that I'm also using the JDBC driver here which of course could al= so > cause the bug, it might be a JDBC driver bug for which I should report a= bug > elsewhere. I confess that I'm not actually trying this with JDBC, but with libpq (via psql and pgbench). One could imagine that JDBC is presenting the query sufficiently differently to cause different backend behavior, say by asking for binary not text output --- but I tried that, no change. I think there must be some other moving parts you haven't mentioned. Maybe you have some PG extension(s) installed? regards, tom lane