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