Re: bytea columns and large values

From: Radosław Smogura <rsmogura(at)softperience(dot)eu>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: David North <dtn(at)corefiling(dot)co(dot)uk>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: bytea columns and large values
Date: 2011-09-29 11:12:56
Message-ID: 267121230b79b36f641e0c0df323fc0b@mail.softperience.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 28 Sep 2011 10:18:27 -0500, Merlin Moncure wrote:
> On Wed, Sep 28, 2011 at 3:28 AM, David North <dtn(at)corefiling(dot)co(dot)uk>
> wrote:
>> On 28/09/11 01:50, Craig Ringer wrote:
>>>
>>> On 09/28/2011 01:01 AM, David North wrote:
>>>
>>>> testdb=# select * from problem_table;
>>>> ERROR: invalid memory alloc request size 2003676411
>>>
>>> What Pg version are you using?
>>>
>>> On which platform?
>>>
>>> 32-bit or 64-bit OS? If 64-bit, with a 32-bit or 64-bit build of
>>> PostgreSQL?
>>
>> psql (PostgreSQL) 9.0.4
>>
>> 64 bit fedora:
>>
>> Fedora release 14 (Laughlin)
>> Linux mybox 2.6.35.14-95.fc14.x86_64 #1 SMP Tue Aug 16 21:01:58 UTC
>> 2011
>> x86_64 x86_64 x86_64 GNU/Linux
>>
>> I presume my build of PostgreSQL is x64 - ldd `which psql` spits out
>> lots of
>> references to lib64.
>
> sending ~1GB bytea values is borderline crazy, and is completely
> crazy
> if you are not absolutely sure the transmission is not 100% binary.
> I
> don't know if the JDBC sends/receives bytea as binary, but it may
> not.
> If not, you might have better luck with the large object interface.
>
> merlin
"Crazy"? I thought that official stand was to keep such crazy values as
TOAST, and LOB interface isn't something worth of usage.

You have exposed such interface, and you firm it. Does this crazynies
is measured by fixed amount above 500MB or it's fuzzy measured with
standard deviation near 1GB? If I use bytea to store such values, looks
I'm crazy too. Sorry, for thinking that documentation is trust worthy.

Thanks for mobilization - I reserved moderngres domains. I think it's
about 1-2 week for making some infrastructure for this.

Regards
Radosław Smogura
http://softperience.eu
http://moderngres.eu - in near future

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregor Vollmer 2011-09-29 12:15:07 Decimal vs. Bigint memory usage
Previous Message Marti Raudsepp 2011-09-29 10:17:55 Re: bytea columns and large values