From: Georg Brünsing <georg.bruensing@clickware.de>
To: pgsql-jdbc@postgresql.org
Subject: jdbc high memory consumption for RAISE NOTICE output using function-call in Java
Date: Tue, 8 Dec 2015 11:37:35 +0100
Message-ID: <5666B2EF.4030005@clickware.de> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
The function creates ~16MB output. The VM needs ~200MB over
statement.executeQuery(...).
CREATE OR REPLACE FUNCTION Test_Grosse_Logdatei() returns INTEGER AS
$$
DECLARE
BEGIN
FOR i IN 1..150000 LOOP
RAISE notice '123456789 123456789 123456789 123456789 123456789
123456789 123456789 123456789 123456789 123456789 ';
END LOOP;
RETURN 0;
END;
$$
language plpgsql;
How can we reduce this?
Georg Brünsing
postgresql-9.4-1206-jdbc4.jar + postgresql-9.1-902.jdbc4.jar
psql (PostgreSQL) 9.3.1
Java(TM) SE Runtime Environment (build 1.8.0_66-b18) + Java(TM) SE
Runtime Environment (build 1.7.0_75-b13) + Java(TM) SE Runtime
Environment (build pxa6460sr7-20091215_02(SR7))
JDK 6-8
Windows/Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: georg.bruensing@clickware.de
Subject: Re: jdbc high memory consumption for RAISE NOTICE output using function-call in Java
In-Reply-To: <5666B2EF.4030005@clickware.de>
References: <5666B2EF.4030005@clickware.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox