From a.cannarsa@cogitas.it Tue Dec 9 10:13:01 2003 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D52A9D1B449 for ; Tue, 9 Dec 2003 10:13:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 97924-05 for ; Tue, 9 Dec 2003 06:12:32 -0400 (AST) Received: from mail.cogitas.it (unknown [81.208.34.2]) by svr1.postgresql.org (Postfix) with ESMTP id BB762D1B454 for ; Tue, 9 Dec 2003 06:12:28 -0400 (AST) Received: from ASSP-nospam ([]) by mail.cogitas.it (VisNetic.MailServer.v5.8.6.5) with SMTP id M41DH2 for ; Tue, 09 Dec 2003 11:10:19 +0100 Received: from 192.168.1.107 ([192.168.1.107] helo=WSDEV11) by ASSP-nospam ; 9 Dec 03 12:11:45 -0000 Message-ID: <002801c3be3c$56146c00$6b01a8c0@cogitas.locale> From: "Andrea Cannarsa" To: Subject: Out of memory error Date: Tue, 9 Dec 2003 11:08:04 +0100 Organization: COGITAS MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0025_01C3BE44.B7C06A00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_30_40 X-Spam-Level: X-Archive-Number: 200312/63 X-Sequence-Number: 8799 This is a multi-part message in MIME format. ------=_NextPart_000_0025_01C3BE44.B7C06A00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, i have a problem with my jdbc driver. When i do a select on a table = within a blob object=20=20 my java application send an error message : "java.lang.out.of.memoryerror".= Now i have try the same select with EMS PostgreSQL Manager and the results= et is correct. I'm using the PostgreSQL ver. 7.3 for windows and the "pg73jdbc3.jar JDBC = - Driver". Who can help me? How can i solve my problem? Thanks Andrea ------=_NextPart_000_0025_01C3BE44.B7C06A00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello, i have a problem with my jdbc drive= r. When=20 i do a select on a table within a blob object  
my java application send an error message = :=20 "java.lang.out.of.memoryerror". Now i have try the same select with EM= S=20 PostgreSQL Manager and the resultset is correct.
I'm using the PostgreSQL ver. 7.3 for wind= ows and=20 the "pg73jdbc3.jar  JDBC - Driver".
 
Who can help me? How can i solve my=20 problem?
 
Thanks Andrea
------=_NextPart_000_0025_01C3BE44.B7C06A00-- From books@ejurka.com Tue Dec 9 22:28:27 2003 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8EB19D1B4BC for ; Tue, 9 Dec 2003 22:28:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 32365-04 for ; Tue, 9 Dec 2003 18:27:58 -0400 (AST) Received: from mail63.csoft.net (leary.csoft.net [63.111.22.80]) by svr1.postgresql.org (Postfix) with SMTP id 501E2D1B4A8 for ; Tue, 9 Dec 2003 18:27:55 -0400 (AST) Received: (qmail 10814 invoked by uid 1112); 9 Dec 2003 22:28:56 -0000 Date: Tue, 9 Dec 2003 17:28:56 -0500 (EST) From: Kris Jurka X-X-Sender: To: Andrea Cannarsa Cc: Subject: Re: Out of memory error In-Reply-To: <002801c3be3c$56146c00$6b01a8c0@cogitas.locale> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/73 X-Sequence-Number: 8809 On Tue, 9 Dec 2003, Andrea Cannarsa wrote: > Hello, i have a problem with my jdbc driver. When i do a select on a > table within a blob object my java application send an error message : > "java.lang.out.of.memoryerror". Now i have try the same select with > EMS PostgreSQL Manager and the resultset is correct. I'm using the > PostgreSQL ver. 7.3 for windows and the "pg73jdbc3.jar JDBC - Driver". > > Who can help me? How can i solve my problem? > How big is the bytea field? The JDBC driver is not very efficient with transferring this and may use 2 or 3 times the memory required. Consider increasing the memory available to the JVM. Also if the query returns multiple rows consider streaming the result set using setFetchSize(). Kris Jurka From stafford@marine.rutgers.edu Fri Feb 2 20:02:53 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 3AA459FB2B7 for ; Fri, 2 Feb 2007 16:02:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 37316-06 for ; Fri, 2 Feb 2007 16:02:49 -0400 (AST) X-Greylist: delayed 00:32:34.396543 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 9EC059FB2AB for ; Fri, 2 Feb 2007 16:02:49 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from bottle.marine.rutgers.edu (bottle.marine.rutgers.edu [165.230.166.145]) by svr4.postgresql.org (Postfix) with ESMTP id 381475AF03B for ; Fri, 2 Feb 2007 19:30:13 +0000 (GMT) Received: from [192.168.50.5] (shah-lt.marine.rutgers.edu [192.168.50.5]) (authenticated bits=0) by bottle.marine.rutgers.edu (8.12.11.20060308/8.12.11) with ESMTP id l12JU2NJ030411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 2 Feb 2007 14:30:02 -0500 Message-ID: <45C3913A.40607@marine.rutgers.edu> Date: Fri, 02 Feb 2007 14:30:02 -0500 From: "Wm.A.Stafford" Reply-To: stafford@marine.rutgers.edu Organization: Institute of Marine and Coastal Sciences User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: out of memory error Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.41 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/18 X-Sequence-Number: 16574 I'm getting 'out of memory' errors when retrieving the entire contents of a reasonably large tables. I spent an hour or so trying all the remedies that showed up via Google search for 'postgresql out of memory' and nothing seemed to work. The two most often recommended were increasing Java heap size (I went up to 128m) and Statement.setFetchSize(1). I saw no significant difference with either of these. Is there a way to eliminate these errors? I'm working on an application that is reading a table and writing it out to a text file after removing unprintable characters. So my program logic is dead simple: select * from table while ( rs.next() ) process and write; My driver is postgresql-8.1-407.jdbc3.jar Thanks, -=bill From books@ejurka.com Fri Feb 2 20:04:49 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C9CC09FA344 for ; Fri, 2 Feb 2007 16:04:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 02217-07 for ; Fri, 2 Feb 2007 16:04:46 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with ESMTP id 960419FA2BB for ; Fri, 2 Feb 2007 16:04:46 -0400 (AST) Received: by mail63.csoft.net (Postfix, from userid 1112) id A70FFFB80; Fri, 2 Feb 2007 15:04:41 -0500 (EST) Date: Fri, 2 Feb 2007 15:04:41 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: "Wm.A.Stafford" cc: pgsql-jdbc@postgresql.org Subject: Re: out of memory error In-Reply-To: <45C3913A.40607@marine.rutgers.edu> Message-ID: References: <45C3913A.40607@marine.rutgers.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/19 X-Sequence-Number: 16575 On Fri, 2 Feb 2007, Wm.A.Stafford wrote: > I'm getting 'out of memory' errors when retrieving the entire contents of a > reasonably large tables. I spent an hour or so trying all the remedies that > showed up via Google search for 'postgresql out of memory' and nothing seemed > to work. The two most often recommended were increasing Java heap size (I > went up to 128m) and Statement.setFetchSize(1). I saw no significant > difference with either of these. Are you satisfying all of the constraints that are mentioned here: http://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor Kris Jurka