Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9E7061337B67 for ; Thu, 14 Apr 2011 00:42:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 43085-01 for ; Thu, 14 Apr 2011 03:41:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id B2F83133798E for ; Thu, 14 Apr 2011 00:41:52 -0300 (ADT) Received: (qmail 9998 invoked by uid 512); 14 Apr 2011 03:41:46 -0000 Received: from unknown (HELO ?100.0.32.108?) (100.0.32.108) by sd2.tpf-fw-c.co.jp with SMTP; 14 Apr 2011 03:41:46 -0000 Message-ID: <4DA66CF9.8080408@tpf.co.jp> Date: Thu, 14 Apr 2011 12:41:45 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Raiford@labware.com CC: pgsql-odbc@postgresql.org Subject: Re: BYTEA Fields and Memory Consumption References: <4DA5122F.5000606@gmx.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.242 tagged_above=-10 required=5 tests=BAYES_00=-1.9, DNS_FROM_RFC_BOGUSMX=1.668, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/14 X-Sequence-Number: 10642 Hi, (2011/04/13 21:09), Raiford@labware.com wrote: > I have an issue where even though I break a large BYTEA object up into > multiple pieces, the ODBC driver just rejoins the pieces in memory and > tries to send it all out at once. I took a look at the code and sure > enough the driver just keeps reallocating memory for each chunk of data > that I add. Yes you are right. > Can I assume Postgres has no mechanism to send this data > across the wire in pieces? Are there any common practices for dealing > with this? Please try lo type instead of bytea type. regards, Hiroshi Inoue > As it is, in one environment I can only transfer files around > 50MB before I start receiving out of memory errors. The same program > running against Oracle and SQL Server works great. > > Jon