Re: blob storage - Mailing list pgsql-general

From Scott Marlowe
Subject Re: blob storage
Date
Msg-id 1114548087.13303.1270.camel@state.g2switchworks.com
Whole thread Raw
In response to blob storage  (Travis Harris <trex005.junk@gmail.com>)
Responses Re: blob storage
List pgsql-general
On Tue, 2005-04-26 at 15:30, Travis Harris wrote:
> I would like to use P* to store files.  These files will probably
> range from 500K to 2 MB in size and there will be thousands upon
> thousands of them.  I was wondering how P* stores blobs, if it is all
> in one file, or if each blob is sored in it's own file.  The reason
> being, I know that windows has a 2 GB limit on files, and if they are
> not stored as their own files, I'll hit my limit FAST... and it'll do
> me no good...  If this is going to be a problem, does anyone have any
> suggestions?

If you store them as large objects, they will each get their own file.

However, you can also store them as rows in a bytea field, and
postgresql will split the table every 1 gig or so automagically.

lo is generally faster but less "database like" and more like a file
system interface while bytea tends to have more overhead due to escaping
/ encoding needed to be done before storage and upon retrieval.

pgsql-general by date:

Previous
From: Stephane Bortzmeyer
Date:
Subject: Re: PRIMARY KEY on a *group* of columns imply that each column is NOT
Next
From: "Joshua D. Drake"
Date:
Subject: Re: blob storage