From: Ramesh Reddy <rareddy@redhat.com>
To: Hiroshi Inoue <inoue@tpf.co.jp>
Cc: Raiford@labware.com
Cc: pgsql-odbc@postgresql.org
Subject: Re: BYTEA Fields and Memory Consumption
Date: Thu, 14 Apr 2011 18:48:21 -0500
Message-ID: <1302824901.3497.26.camel@localhost.localdomain> (raw)
In-Reply-To: <4DA7864D.2010506@tpf.co.jp>
References: <4DA5122F.5000606@gmx.net>
<OF30EF0461.6F402208-ON85257871.00422A74-85257871.0042C717@labware.com>
<4DA66CF9.8080408@tpf.co.jp>
<OFCCF5C501.800D585C-ON85257872.004349FD-85257872.004387CE@labware.com>
<4DA7864D.2010506@tpf.co.jp>
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.
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 <inoue@tpf.co.jp>
> > 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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: rareddy@redhat.com, inoue@tpf.co.jp, Raiford@labware.com
Subject: Re: BYTEA Fields and Memory Consumption
In-Reply-To: <1302824901.3497.26.camel@localhost.localdomain>
References: <4DA5122F.5000606@gmx.net> <OF30EF0461.6F402208-ON85257871.00422A74-85257871.0042C717@labware.com> <4DA66CF9.8080408@tpf.co.jp> <OFCCF5C501.800D585C-ON85257872.004349FD-85257872.004387CE@labware.com> <4DA7864D.2010506@tpf.co.jp> <1302824901.3497.26.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox