Re: Storing many big files in database- should I do it?

From: Justin Graf <justin(at)magwerks(dot)com>
To: David Wall <d(dot)wall(at)computer(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Storing many big files in database- should I do it?
Date: 2010-04-29 18:07:31
Message-ID: 4BD9CAE3.2000804@magwerks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/29/2010 1:51 PM, David Wall wrote:
>
>> Put it another way: bytea values are not stored in the pg_largeobject
>> catalog.
>
> I missed the part that BYTEA was being used since it's generally not a
> good way for starting large binary data because you are right that
> BYTEA requires escaping across the wire (client to backend) both
> directions, which for true binary data (like compressed/encrypted
> data, images or other non-text files) makes for a lot of expansion in
> size and related memory.
>
> BYTEA and TEXT both can store up to 1GB of data (max field length),
> which means even less "file size" supported if you use TEXT with
> base64 coding. LO supports 2GB of data. In JDBC, typically BYTEA is
> used with byte[] or binary stream while LOs with BLOB. I think LOs
> allow for streaming with the backend, too, but not sure about that,
> whereas I'm pretty sure BYTEA/TEXT move all the data together you it
> will be in memory all or nothing.
>
> Of course, to support larger file storage than 1GB or 2GB, you'll have
> to create your own "toast" like capability to split them into multiple
> rows.
>
> David
>
Outside of videos/media streams what other kind of data is going to be
1gig in size. Thats allot of data still even still today.

We all talk about 1 gig and 2 gig limits on this, but really who has
bumped into that on regular bases??? Every time i hear about that not
being big enough the person is trying to shoe horn in media files into
the database, which is insane

All legitimate Magwerks Corporation quotations are sent in a .PDF file attachment with a unique ID number generated by our proprietary quotation system. Quotations received via any other form of communication will not be honored.

CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally privileged, confidential or other information proprietary to Magwerks Corporation and is intended solely for the use of the individual to whom it addresses. If the reader of this e-mail is not the intended recipient or authorized agent, the reader is hereby notified that any unauthorized viewing, dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and destroy all occurrences of this e-mail immediately.
Thank you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martin Gainty 2010-04-29 18:08:20 Re: Writing SRF
Previous Message Tom Lane 2010-04-29 18:03:21 Re: Writing SRF