From georg.bruensing@clickware.de Tue Dec 8 11:44:30 2015 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Gh4-0001Fq-1V for pgsql-jdbc@arkaria.postgresql.org; Tue, 08 Dec 2015 11:44:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a6Gh3-00050q-KU for pgsql-jdbc@arkaria.postgresql.org; Tue, 08 Dec 2015 11:44:29 +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_SHA384:256) (Exim 4.84) (envelope-from ) id 1a6G8J-0006mz-FH for pgsql-jdbc@postgresql.org; Tue, 08 Dec 2015 11:08:35 +0000 Received: from mx01.clickware.de ([78.35.13.85]) by magus.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a6G8G-0002ZQ-DW for pgsql-jdbc@postgresql.org; Tue, 08 Dec 2015 11:08:35 +0000 Received: (qmail 4148 invoked by uid 1010); 8 Dec 2015 10:37:36 -0000 Received: from localhost (gbruensing@localhost) by mx01 (envelope-from , uid 1002) with qmail-scanner-2.06st (sophie: //. spamassassin: 3.2.3. Clear:RC:0(127.0.0.1):SA:0(-3.7/5.0):. Processed in 0.111678 secs); 08 Dec 2015 10:37:36 -0000 X-Spam-Status: No, hits=-3.7 required=5.0 Received: from localhost (HELO ?192.168.1.149?) (gbruensing@127.0.0.1) by mx01.clickware.de with SMTP; 8 Dec 2015 10:37:35 -0000 To: pgsql-jdbc@postgresql.org From: =?UTF-8?Q?Georg_Br=c3=bcnsing?= Subject: jdbc high memory consumption for RAISE NOTICE output using function-call in Java Message-ID: <5666B2EF.4030005@clickware.de> Date: Tue, 8 Dec 2015 11:37:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------000104010705010500090809" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. --------------000104010705010500090809 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------000104010705010500090809 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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


--------------000104010705010500090809-- From dblanch@hoplasoftware.com Tue Dec 8 12:02:56 2015 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Gyu-0001yQ-FV for pgsql-jdbc@arkaria.postgresql.org; Tue, 08 Dec 2015 12:02:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a6Gyu-00072g-1n for pgsql-jdbc@arkaria.postgresql.org; Tue, 08 Dec 2015 12:02:56 +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_SHA384:256) (Exim 4.84) (envelope-from ) id 1a6GyP-0006Sv-9i for pgsql-jdbc@postgresql.org; Tue, 08 Dec 2015 12:02:25 +0000 Received: from hermes.doblenet.net ([213.27.130.15]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1a6GyL-0003rP-6D for pgsql-jdbc@postgresql.org; Tue, 08 Dec 2015 12:02:24 +0000 Content-Type: multipart/alternative; boundary="Apple-Mail=_5339A04D-7456-44BA-8009-6A1DA89239E8" Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: jdbc high memory consumption for RAISE NOTICE output using function-call in Java From: Daniel Blanch Bataller In-Reply-To: <5666B2EF.4030005@clickware.de> Date: Tue, 8 Dec 2015 13:02:19 +0100 Cc: pgsql-jdbc@postgresql.org Message-Id: <21F11FC1-33EB-4FDB-8B9C-0BB6198A96A2@hoplasoftware.com> References: <5666B2EF.4030005@clickware.de> To: =?utf-8?Q?Georg_Br=C3=BCnsing?= X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org --Apple-Mail=_5339A04D-7456-44BA-8009-6A1DA89239E8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Georg: Could you elaborate a bit more why do you want to RAISE NOTICE 150000 = times? Regards - Daniel. > El 8 dic 2015, a las 11:37, Georg Br=C3=BCnsing = escribi=C3=B3: >=20 > The function creates ~16MB output. The VM needs ~200MB over = statement.executeQuery(...). >=20 > 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; =20 > =20 > RETURN 0; > END; > $$ > language plpgsql; >=20 > How can we reduce this? >=20 > Georg Br=C3=BCnsing >=20 > 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 >=20 >=20 --Apple-Mail=_5339A04D-7456-44BA-8009-6A1DA89239E8 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Hi Georg:

Could you elaborate a bit more why do = you want to RAISE NOTICE 150000 times?

Regards

- Daniel.


El 8 dic 2015, a las 11:37, Georg Br=C3=BCnsing <georg.bruensing@clickware.de> escribi=C3=B3:

=20 =20
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=C3=BCnsing

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



= --Apple-Mail=_5339A04D-7456-44BA-8009-6A1DA89239E8-- From sitnikov.vladimir@gmail.com Tue Dec 8 13:48:42 2015 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a6IdG-00061J-54 for pgsql-jdbc@arkaria.postgresql.org; Tue, 08 Dec 2015 13:48:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a6IdF-0001wC-Nc for pgsql-jdbc@arkaria.postgresql.org; Tue, 08 Dec 2015 13:48:41 +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_SHA384:256) (Exim 4.84) (envelope-from ) id 1a6IdF-0001vt-5g for pgsql-jdbc@postgresql.org; Tue, 08 Dec 2015 13:48:41 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a6IdB-0006Jz-9R for pgsql-jdbc@postgresql.org; Tue, 08 Dec 2015 13:48:40 +0000 Received: by wmww144 with SMTP id w144so181686201wmw.1 for ; Tue, 08 Dec 2015 05:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=x2dhXkYsppkCSXaDhQbS1xMhCvGnu6NPgsOyVB7tPcc=; b=jblcTLI4nRwdfp8fWr0aTXRyg6n2XwrLZbZ+m3eyclxO9Is6vWE/sHq5zsLdpYPiGk WBX3CpaGRdvbM3QfgvbAu2ZvP+V4vQMZcLFjSt4MPGyXfGU4GakQyBjX1i7SoDoKUH3S ePTM54MTi1QHc/FkWXyuSNLsZ7A9c9EsRVuMs1cHjN2b33A8fqW0JC2Jt/XNptIIaisw CUT+Kf9dbbEGtuedzfqkIRl0wVOoRRbCIEjiDW2YxZlTXHQ5cqEihR/YJUHXw7XPeZyA 23fVeG8WVJ2SWGdrBsCJo0V9Fq0oAiYgU1MjsXJfAf6DML5txQawh0d2a+UzOaZGjImR lMtg== MIME-Version: 1.0 X-Received: by 10.28.13.138 with SMTP id 132mr4998538wmn.62.1449582516223; Tue, 08 Dec 2015 05:48:36 -0800 (PST) Received: by 10.27.229.132 with HTTP; Tue, 8 Dec 2015 05:48:36 -0800 (PST) In-Reply-To: <21F11FC1-33EB-4FDB-8B9C-0BB6198A96A2@hoplasoftware.com> References: <5666B2EF.4030005@clickware.de> <21F11FC1-33EB-4FDB-8B9C-0BB6198A96A2@hoplasoftware.com> Date: Tue, 8 Dec 2015 16:48:36 +0300 Message-ID: Subject: Re: jdbc high memory consumption for RAISE NOTICE output using function-call in Java From: Vladimir Sitnikov To: =?UTF-8?Q?Georg_Br=C3=BCnsing?= Cc: List Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org >How can we reduce this? It would be better not to abuse "raise ...". However, if you cannot alter the software to remove that "raise", use client_min_messages=WARNING: http://www.postgresql.org/docs/9.4/static/runtime-config-logging.html#GUC-CLIENT-MIN-MESSAGES Regards, Vladimir Sitnikov -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc