Skip site navigation (1) Skip section navigation (2)

Re: BYTEA Fields and Memory Consumption

From: Raiford(at)labware(dot)com
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org,pgsql-odbc-owner(at)postgresql(dot)org
Subject: Re: BYTEA Fields and Memory Consumption
Date: 2011-04-14 12:17:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
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, 
the ODBC driver automatically sends the data in pieces?  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 :)


From:   Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To:     Raiford(at)labware(dot)com
Cc:     pgsql-odbc(at)postgresql(dot)org
Date:   04/13/2011 11:42 PM
Subject:        Re: [ODBC] BYTEA Fields and Memory Consumption
Sent by:        pgsql-odbc-owner(at)postgresql(dot)org


(2011/04/13 21:09), Raiford(at)labware(dot)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.

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

In response to


pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2011-04-14 23:42:05
Subject: Re: BYTEA Fields and Memory Consumption
Previous:From: Josef SpringerDate: 2011-04-14 08:36:49
Subject: Updating column with Unicode does not work

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group