jdbc high memory consumption for RAISE NOTICE output using function-call in Java

From: Georg Brünsing <georg(dot)bruensing(at)clickware(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: jdbc high memory consumption for RAISE NOTICE output using function-call in Java
Date: 2015-12-08 10:37:35
Message-ID: 5666B2EF.4030005@clickware.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Daniel Blanch Bataller 2015-12-08 12:02:19 Re: jdbc high memory consumption for RAISE NOTICE output using function-call in Java
Previous Message Korry Douglas 2015-12-07 21:12:41 Re: Patch: Implement failover on libpq connect level.