X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CB7685E470C for ; Sat, 28 Aug 2004 20:53:14 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 04142-07 for ; Sat, 28 Aug 2004 23:53:09 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 9CC725E46D1 for ; Sat, 28 Aug 2004 20:53:07 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1C1D0L-0005iK-00; Sun, 29 Aug 2004 11:53:05 +1200 Message-ID: <41311ADF.9060207@opencloud.com> Date: Sun, 29 Aug 2004 11:53:03 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Warren Little Cc: pgsql-jdbc@postgresql.org Subject: Re: jdbc and large binary files References: <1093735390.2866.6.camel@localhost.localdomain> In-Reply-To: <1093735390.2866.6.camel@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/157 X-Sequence-Number: 10879 Warren Little wrote: > Hello, > I'm currently using the LO api with the oid data type for storing > large objects. I would like to switch to bytea data. When I last > tested this idea (over 8 months ago) I experienced massive memory bloat > in the JDBC application. I recall seeing some threads on fixing this > problem. Can anyone tell me if this issue has been addressed in the > latest driver? PreparedStatement.setBinaryStream() will now stream data directly to the server with no additional heap storage needed. setBytes() takes a copy of the bytearray it is given, but otherwise behaves like setBinaryStream(). ResultSet still stores the whole value on heap. To avoid this requires protocol modifications. -O