Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 347E11337B81 for ; Fri, 15 Apr 2011 00:35:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 86825-09 for ; Fri, 15 Apr 2011 03:34:56 +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 E373B1337B6E for ; Fri, 15 Apr 2011 00:34:55 -0300 (ADT) Received: (qmail 28993 invoked by uid 512); 15 Apr 2011 03:34:54 -0000 Received: from unknown (HELO ?100.0.32.108?) (100.0.32.108) by sd2.tpf-fw-c.co.jp with SMTP; 15 Apr 2011 03:34:54 -0000 Message-ID: <4DA7BCDB.3090606@tpf.co.jp> Date: Fri, 15 Apr 2011 12:34:51 +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: rareddy@redhat.com CC: Raiford@labware.com, pgsql-odbc@postgresql.org Subject: Re: BYTEA Fields and Memory Consumption References: <4DA5122F.5000606@gmx.net> <4DA66CF9.8080408@tpf.co.jp> <4DA7864D.2010506@tpf.co.jp> <1302824901.3497.26.camel@localhost.localdomain> In-Reply-To: <1302824901.3497.26.camel@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; 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/19 X-Sequence-Number: 10647 Hi Ramesh, (2011/04/15 8:48), Ramesh Reddy wrote: > In my experience even when using 'lo' the driver only got the first > chunk of data which is equal to the length of the buffer that client > provided and never went back to ask for next chunk. Clients have to call some special API/methods provided by the interface they are using, e.g. ODBC native apps calls SQLPutData(), ADO apps calls AppendChunk(). regards, Hiroshi Inoue > Also, I am not sure how one can read multiple blocks from client code? > > Ramesh.. > > On Fri, 2011-04-15 at 08:42 +0900, Hiroshi Inoue wrote: >> (2011/04/14 21:17), Raiford@labware.com wrote: >>> Hi Hiroshi-san, >>> >>> Thank you for your response. Could you clarify one thing for me? Are you >>> suggesting that when using an lo datatype with the lo module installed, >> >> You don't have to install the lo module. Please type >> >> create domain lo as oid; >> >> and use the lo type. >> >>> the ODBC driver automatically sends the data in pieces? >> >> Yes. >> >> regards, >> Hiroshi Inoue >> >> > Or does it only >>> open the possibility for me to use the lo_import() function? If >>> everything is handled internally in the ODBC driver, it would certainly >>> help a lot :) >>> >>> Jon >>> >>> From: Hiroshi Inoue >>> To: Raiford@labware.com >>> Cc: pgsql-odbc@postgresql.org >>> Date: 04/13/2011 11:42 PM >>> Subject: Re: [ODBC] BYTEA Fields and Memory Consumption >>> Sent by: pgsql-odbc-owner@postgresql.org >>> ------------------------------------------------------------------------ >>> >>> 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