I sent the email below to the creator of contrib/vacuumlo/ with no reply
just yet.

Is it possible to get his code included in the main vacuumdb program for
support to vacuum orphaned large objects?

Or... Any suggestions, what do people think?

Thanks.

---------- Forwarded message ----------
Date: Tue, 24 Jul 2001 09:45:01 +1000 (EST)
From: Grant <grant@conprojan.com.au>
To: peter@retep.org.uk
Subject: vacuumlo.

G'day,

I've recently discovered that LO's do not get deleted when a record
referencing that OID is removed. I'm assuming you created the program and
do you think it is possible to get this included as an argument for
vacuumdb?

vacuumdb -o <db>

Or something along those lines so scanning for orphan large objects could
be done from the main vacuum binary?

What do you think?

Thanks.




Tue, 31 Jul 2001 10:14:50 +1000 (EST)
Grant <grant@conprojan.com.au>
vacuumlo.
Grant <grant@conprojan.com.au> writes:
> Is it possible to get [vacuumlo] included in the main vacuumdb program for
> support to vacuum orphaned large objects?

Hmm.  I'm not convinced that vacuumlo is ready for prime time...
in particular, how safe is it in the presence of concurrent
transactions that might be adding or removing LOs?

			regards, tom lane

Mon, 30 Jul 2001 21:29:41 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: vacuumlo. 
> > Is it possible to get [vacuumlo] included in the main vacuumdb program for
> > support to vacuum orphaned large objects?
> 
> Hmm.  I'm not convinced that vacuumlo is ready for prime time...
> in particular, how safe is it in the presence of concurrent
> transactions that might be adding or removing LOs?

I see large objects for each database are stored in pg_largeobject referenced
by the loid. So when I delete a file from a table containing an oid type I have
to make sure to delete the matching row(s) from pg_largeobject.

Can you see a scenario where a programmer would forget to delete the data from
pg_largeobject and the database becoming very large filled with orphaned large
objects? Or am I on the wrong track?


Tue, 31 Jul 2001 11:52:10 +1000 (EST)
Grant <grant@conprojan.com.au>
Re: vacuumlo. 
Grant <grant@conprojan.com.au> writes:
> Can you see a scenario where a programmer would forget to delete the
> data from pg_largeobject and the database becoming very large filled
> with orphaned large objects?

Sure.  My point wasn't that the functionality isn't needed, it's that
I'm not sure vacuumlo does it well enough to be ready to promote to
the status of mainstream code.  It needs more review and testing before
we can move it out of /contrib.

			regards, tom lane

Mon, 30 Jul 2001 22:21:32 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: vacuumlo. 
Tom Lane wrote:
> 
> Grant <grant@conprojan.com.au> writes:
> > Can you see a scenario where a programmer would forget to delete the
> > data from pg_largeobject and the database becoming very large filled
> > with orphaned large objects?
> 
> Sure.  My point wasn't that the functionality isn't needed, it's that
> I'm not sure vacuumlo does it well enough to be ready to promote to
> the status of mainstream code.  It needs more review and testing before
> we can move it out of /contrib.
> 

IIRC vacuumlo doesn't take the type lo(see contrib/lo) into
account. I'm suspicious if vacuumlo is reliable.

regards,
Hiroshi Inoue

Tue, 31 Jul 2001 13:16:23 +0900
Hiroshi Inoue <Inoue@tpf.co.jp>
Re: vacuumlo.
> > > Can you see a scenario where a programmer would forget to delete the
> > > data from pg_largeobject and the database becoming very large filled
> > > with orphaned large objects?
> > 
> > Sure.  My point wasn't that the functionality isn't needed, it's that
> > I'm not sure vacuumlo does it well enough to be ready to promote to
> > the status of mainstream code.  It needs more review and testing before
> > we can move it out of /contrib.
> > 
> 
> IIRC vacuumlo doesn't take the type lo(see contrib/lo) into
> account. I'm suspicious if vacuumlo is reliable.

This was my round about way of asking if something to combat this issue
can be placed in the to do list. :)

Thanks.


Tue, 31 Jul 2001 14:25:00 +1000 (EST)
Grant <grant@conprojan.com.au>
Re: vacuumlo.
> > > > Can you see a scenario where a programmer would forget to delete the
> > > > data from pg_largeobject and the database becoming very large filled
> > > > with orphaned large objects?
> > > 
> > > Sure.  My point wasn't that the functionality isn't needed, it's that
> > > I'm not sure vacuumlo does it well enough to be ready to promote to
> > > the status of mainstream code.  It needs more review and testing before
> > > we can move it out of /contrib.
> > > 
> > 
> > IIRC vacuumlo doesn't take the type lo(see contrib/lo) into
> > account. I'm suspicious if vacuumlo is reliable.
> 
> This was my round about way of asking if something to combat this issue
> can be placed in the to do list. :)

Added to TODO:

	* Improve vacuum of large objects (/contrib/vacuumlo)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 31 Jul 2001 09:21:19 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: vacuumlo.
> > > > IIRC vacuumlo doesn't take the type lo(see contrib/lo) into
> > > > account. I'm suspicious if vacuumlo is reliable.
> > >
> > > This was my round about way of asking if something to combat this issue
> > > can be placed in the to do list. :)
> > 
> > Added to TODO:
> > 
> >         * Improve vacuum of large objects (/contrib/vacuumlo)
> > 
> 
> Is it possible for vacuumlo to be moved out of /contrib ?
> As far as I see, there's no perfect solution for vacuumlo.

Not sure myself.  Let's see what others say.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 31 Jul 2001 21:25:45 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: vacuumlo.
Bruce Momjian wrote:
> 
> > > > > Can you see a scenario where a programmer would forget to delete the
> > > > > data from pg_largeobject and the database becoming very large filled
> > > > > with orphaned large objects?
> > > >
> > > > Sure.  My point wasn't that the functionality isn't needed, it's that
> > > > I'm not sure vacuumlo does it well enough to be ready to promote to
> > > > the status of mainstream code.  It needs more review and testing before
> > > > we can move it out of /contrib.
> > > >
> > >
> > > IIRC vacuumlo doesn't take the type lo(see contrib/lo) into
> > > account. I'm suspicious if vacuumlo is reliable.
> >
> > This was my round about way of asking if something to combat this issue
> > can be placed in the to do list. :)
> 
> Added to TODO:
> 
>         * Improve vacuum of large objects (/contrib/vacuumlo)
> 

Is it possible for vacuumlo to be moved out of /contrib ?
As far as I see, there's no perfect solution for vacuumlo.

regards,
Hiroshi Inoue

Wed, 01 Aug 2001 10:25:54 +0900
Hiroshi Inoue <Inoue@tpf.co.jp>
Re: vacuumlo.