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 1h5wyD-0006Gf-Ss for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 18:26:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5wyC-0007QN-IJ for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 18:26:44 +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 1h5wyC-0007QG-Bq for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 18:26:44 +0000 Received: from server01.webapps.manitu.net ([217.11.48.33]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5wy9-00047j-Rc for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 18:26:43 +0000 Received: from webmail.manitu.de (localhost [127.0.0.1]) by server01.webapps.manitu.net (Postfix) with ESMTP id EA82EAA0093; Mon, 18 Mar 2019 19:26:40 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 18 Mar 2019 19:26:40 +0100 From: Matthias Otterbach To: Tom Lane 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: <16717.1552926811@sss.pgh.pa.us> References: <15700-8c408321a87d56bb@postgresql.org> <16717.1552926811@sss.pgh.pa.us> Message-ID: <4ef5f38d5710c4d5c289537c588c7335@otterbach.eu> X-Sender: mo@otterbach.eu User-Agent: Roundcube Webmail/1.3.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dear Tom Lane, dear pgsql-bugs list, thanks for your reply and attempt to reproduce my memory issue. Am 2019-03-18 17:33, schrieb Tom Lane: > PG Bug reporting form writes: > >> I know that I'm also using the JDBC driver here which of course could >> also >> 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. Can I do anything to figure out how the JDBC driver presents the query? Is there any information available if I increase a log level or enable any debugging output in the PostgreSQL server? I tried increasing log levels a little bit, but actually I do not know if it gives any more information: log_min_messages = debug5 log_min_error_statement = debug5 debug_print_parse = on debug_print_rewritten = on debug_print_plan = on debug_pretty_print = on log_connections = on log_disconnections = on log_duration = on log_error_verbosity = verbose You can find an extract from the logfile at https://pastebin.com/5eB0t0uS (filtered for my process id which caused the crash even though there were not many other processes as I use this virtual machine solely for this test query). > I think there must be some other moving parts you haven't mentioned. > Maybe you have some PG extension(s) installed? Actually I hope not, that is why I tried to reproduce the problem with a vanilla Ubuntu and PostgreSQL installation in a virtual machine - to make sure that there are no other extensions or anything influence my issue. Actually "postgres=# select * from pg_extension;" returns: extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition ---------+----------+--------------+----------------+------------+-----------+-------------- plpgsql | 10 | 11 | f | 1.0 | | (1 row) Best regards, Matthias Otterbach