Re: Large Objects

From: Robby Russell <robby(at)planetargon(dot)com>
To: Dan Boitnott <dan(at)mcneese(dot)edu>
Cc: pgsql general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Large Objects
Date: 2005-01-03 18:15:30
Message-ID: 1104776131.12005.69.camel@linus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 2005-01-01 at 19:50 -0600, Dan Boitnott wrote:
> On Jan 1, 2005, at 11:40 AM, Joshua D. Drake wrote:
>
> >
> >>>
> >> Intresting.
> >> What is the size when bytea become inafective ?
> >>
> >> Currently i keep all my products images in bytea record. is it
> >> practical ?
> >
> > Well I am going to make the assumption that you product images are
> > small...
> > sub 100k or something. Bytea is just fine for that. The problem is when
> > the binary you want to store is 50 megs. When you access that file you
> > will be using 50 megs of ram to do so.
> >
> > Large Objects don't work that way, you don't have the memory overhead.
> > So
> > it really depends on what you want to store.
> >
>
> I prefer the _idea_ of using large objects but am worried about the
> implications. Without them I can back up the database using pg_dump
> and get a single tar file which can perfectly represent the database.
> This gives me (and those on high) the warm-fuzzies. If I store files
> (PDFs of varying sizes by the way, say from 500k to 50M) as large
> objects, will I still be able to restore the _whole_ database from a
> single pg_dump tar file?

Yes, you will be able to do this. Your pg_dump

http://www.postgresql.org/docs/current/static/app-pgdump.html
> -b
> --blobs
>
> Include large objects in dump.
>
>

-Robby

--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON | www.planetargon.com
* Portland, OR | robby(at)planetargon(dot)com
* 503.351.4730 | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
* --- Now supporting PHP5 ---
****************************************/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lonni J Friedman 2005-01-03 18:24:49 Re: Can't change password?
Previous Message Frank D. Engel, Jr. 2005-01-03 17:52:23 Re: Generating unique values for TEXT columns