Re: Deleting BLOBs

From: Neanderthelle Jones <elle(at)view(dot)net(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Deleting BLOBs
Date: 2012-08-13 00:37:30
Message-ID: Pine.LNX.4.64.1208130955250.30414@calypso.view.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 12 Aug 2012, Tom Lane wrote:
> Neanderthelle Jones <elle(at)view(dot)net(dot)au> writes:
> > One attempt. Is the error mine or PostgreSQL's?
>
> > $ for i in $(psql -q -t -U elle -d my_db \
> > -c "SELECT raster FROM images where raster > 0"); do
> > echo $i
> > psql -q -U elle -d my_db -c "SELECT lo_unlink($i)"
> > done
>
> > 21234
> > ERROR: large object 21234 does not exist
> > 21235
> > ERROR: large object 21235 does not exist
> > [etc]
>
> That script looks reasonable enough, if perhaps not too fast. Are you
> sure the table actually does reference live large objects?

Thanks, Tom. No, because I fumbled a bit, and didn't vacuum. They
may have gone, but I don't understand why the oids get echoed in that
case.

What does "live" mean?

Elle

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-08-13 00:52:44 Re: Deleting BLOBs
Previous Message Tom Lane 2012-08-13 00:13:07 Re: Deleting BLOBs