head	1.6;
access;
symbols
	REL9_0_0:1.4.14.2
	REL9_1_ALPHA1:1.6
	REL9_0_RC1:1.4.14.2
	REL9_0_BETA4:1.4.14.1
	REL9_0_STABLE:1.4.0.14
	REL9_0_BETA3:1.4
	REL9_0_BETA2:1.4
	REL8_3_11:1.3
	REL8_4_4:1.4
	REL9_0_BETA1:1.4
	REL9_0_ALPHA5_BRANCH:1.4.0.12
	REL9_0_ALPHA5:1.4
	REL8_3_10:1.3
	REL8_4_3:1.4
	REL9_0_ALPHA4:1.4
	REL9_0_ALPHA4_BRANCH:1.4.0.10
	REL8_5_ALPHA3:1.4
	REL8_5_ALPHA3_BRANCH:1.4.0.8
	REL8_3_9:1.3
	REL8_4_2:1.4
	REL8_5_ALPHA2:1.4
	REL8_5_ALPHA2_BRANCH:1.4.0.6
	REL8_3_8:1.3
	REL8_4_1:1.4
	REL8_5_ALPHA1:1.4
	REL8_5_ALPHA1_BRANCH:1.4.0.4
	REL8_4_STABLE:1.4.0.2
	REL8_4_0:1.4
	REL8_4_RC2:1.4
	REL8_4_RC1:1.4
	REL8_4_BETA2:1.4
	REL8_4_BETA1:1.4
	REL8_3_7:1.3
	REL8_3_6:1.3
	REL8_3_5:1.3
	REL8_3_4:1.3
	REL8_3_3:1.3
	REL8_3_2:1.3
	REL8_3_1:1.3
	REL8_3_STABLE:1.3.0.2
	REL8_3_0:1.3
	REL8_3_RC2:1.3
	REL8_3_RC1:1.3
	REL8_3_BETA4:1.1
	REL8_3_BETA3:1.1;
locks; strict;
comment	@# @;


1.6
date	2010.08.17.04.37.21;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2010.07.29.19.34.40;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2009.02.26.16.02.37;	author petere;	state Exp;
branches
	1.4.14.1;
next	1.3;

1.3
date	2007.12.11.19.57.32;	author tgl;	state Exp;
branches;
next	1.2;

1.2
date	2007.12.06.04.12.10;	author tgl;	state Exp;
branches;
next	1.1;

1.1
date	2007.11.10.23.30.46;	author momjian;	state Exp;
branches;
next	;

1.4.14.1
date	2010.07.29.19.34.37;	author petere;	state Exp;
branches;
next	1.4.14.2;

1.4.14.2
date	2010.08.17.04.37.19;	author petere;	state Exp;
branches;
next	;


desc
@@


1.6
log
@Spell and markup checking
@
text
@<!-- $PostgreSQL: pgsql/doc/src/sgml/vacuumlo.sgml,v 1.5 2010/07/29 19:34:40 petere Exp $ -->

<sect1 id="vacuumlo">
 <title>vacuumlo</title>

 <indexterm zone="vacuumlo">
  <primary>vacuumlo</primary>
 </indexterm>

 <para>
  <application>vacuumlo</> is a simple utility program that will remove any
  <quote>orphaned</> large objects from a
  <productname>PostgreSQL</> database.  An orphaned large object (LO) is
  considered to be any LO whose OID does not appear in any <type>oid</> or
  <type>lo</> data column of the database.
 </para>

 <para>
  If you use this, you may also be interested in the <function>lo_manage</>
  trigger in <filename>contrib/lo</> (see <xref linkend="lo">).
  <function>lo_manage</> is useful to try
  to avoid creating orphaned LOs in the first place.
 </para>

 <sect2>
  <title>Usage</title>

<synopsis>
vacuumlo [options] database [database2 ... databaseN]
</synopsis>

  <para>
   All databases named on the command line are processed.  Available options
   include:
  </para>

  <variablelist>
   <varlistentry>
    <term><option>-v</option></term>
    <listitem>
     <para>Write a lot of progress messages.</para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>-n</option></term>
    <listitem>
     <para>Don't remove anything, just show what would be done.</para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>-U</option> <replaceable>username</></term>
    <listitem>
     <para>User name to connect as.</para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>-w</></term>
    <term><option>--no-password</></term>
    <listitem>
     <para>
      Never issue a password prompt.  If the server requires password
      authentication and a password is not available by other means
      such as a <filename>.pgpass</filename> file, the connection
      attempt will fail.  This option can be useful in batch jobs and
      scripts where no user is present to enter a password.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>-W</option></term>
    <listitem>
     <para>
      Force <application>vacuumlo</application> to prompt for a
      password before connecting to a database.  
     </para>

     <para>
      This option is never essential, since
      <application>vacuumlo</application> will automatically prompt
      for a password if the server demands password authentication.
      However, <application>vacuumlo</application> will waste a
      connection attempt finding out that the server wants a password.
      In some cases it is worth typing <option>-W</> to avoid the extra
      connection attempt.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>-h</option> <replaceable>hostname</></term>
    <listitem>
     <para>Database server's host.</para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>-p</option> <replaceable>port</></term>
    <listitem>
     <para>Database server's port.</para>
    </listitem>
   </varlistentry>
  </variablelist>
 </sect2>

 <sect2>
  <title>Method</title>

  <para>
   First, it builds a temporary table which contains all of the OIDs of the
   large objects in that database.
  </para>

  <para>
   It then scans through all columns in the database that are of type
   <type>oid</> or <type>lo</>, and removes matching entries from the
  temporary table.
  </para>

  <para>
   The remaining entries in the temp table identify orphaned LOs.
   These are removed.
  </para>
 </sect2>

 <sect2>
  <title>Author</title>

  <para>
   Peter Mount <email>peter@@retep.org.uk</email>
  </para>
 </sect2>

</sect1>
@


1.5
log
@Fix indentation of verbatim block elements

Block elements with verbatim formatting (literallayout, programlisting,
screen, synopsis) should be aligned at column 0 independent of the surrounding
SGML, because whitespace is significant, and indenting them creates erratic
whitespace in the output.  The CSS stylesheets already take care of indenting
the output.

Assorted markup improvements to go along with it.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/vacuumlo.sgml,v 1.4 2009/02/26 16:02:37 petere Exp $ -->
d55 1
a55 1
     <para>Username to connect as.</para>
@


1.4
log
@Add a -w/--no-password option that prevents all password prompts to all
programs that have a -W/--password option.

In passing, remove the ancient PSQL_ALWAYS_GET_PASSWORDS compile option.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/vacuumlo.sgml,v 1.3 2007/12/11 19:57:32 tgl Exp $ -->
d28 1
a28 1
  <synopsis>
d30 1
a30 1
  </synopsis>
@


1.4.14.1
log
@Fix indentation of verbatim block elements

Block elements with verbatim formatting (literallayout, programlisting,
screen, synopsis) should be aligned at column 0 independent of the surrounding
SGML, because whitespace is significant, and indenting them creates erratic
whitespace in the output.  The CSS stylesheets already take care of indenting
the output.

Assorted markup improvements to go along with it.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/vacuumlo.sgml,v 1.4 2009/02/26 16:02:37 petere Exp $ -->
d28 1
a28 1
<synopsis>
d30 1
a30 1
</synopsis>
@


1.4.14.2
log
@Spell and markup checking
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/vacuumlo.sgml,v 1.4.14.1 2010/07/29 19:34:37 petere Exp $ -->
d55 1
a55 1
     <para>User name to connect as.</para>
@


1.3
log
@Make documentation of -W options more accurate and uniform.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/vacuumlo.sgml,v 1.2 2007/12/06 04:12:10 tgl Exp $ -->
d60 14
@


1.2
log
@Make an editorial pass over the newly SGML-ified contrib documentation.
Fix lots of bad markup, bad English, bad explanations.

This commit covers only about half the contrib modules, but I grow weary...
@
text
@d1 1
a1 1
<!-- $PostgreSQL$ -->
d41 1
a41 1
     <para>Write a lot of progress messages</para>
d48 1
a48 1
     <para>Don't remove anything, just show what would be done</para>
d55 1
a55 1
     <para>Username to connect as</para>
d62 14
a75 1
     <para>Force prompt for password (generally useless)</para>
d82 1
a82 1
     <para>Database server's host</para>
d89 1
a89 1
     <para>Database server's port</para>
@


1.1
log
@Move most /contrib README files into SGML.  Some still need conversion
or will never be converted.
@
text
@d1 2
d5 1
a5 1
 
d11 5
a15 8
  This is a simple utility that will remove any orphaned large objects out of a
  PostgreSQL database.  An orphaned LO is considered to be any LO whose OID
  does not appear in any OID data column of the database.
 </para>
 <para>
  If you use this, you may also be interested in the lo_manage trigger in
  contrib/lo.  lo_manage is useful to try to avoid creating orphaned LOs
  in the first place.
d17 1
d19 4
a22 7
  <note>
   <para>
    It was decided to place this in contrib as it needs further testing, but hopefully,
    this (or a variant of it) would make it into the backend as a "vacuum lo"
    command in a later release.
   </para>
  </note>
d27 5
a31 3
  <programlisting>
vacuumlo [options] database [database2 ... databasen]
  </programlisting>
d36 44
a79 8
  <programlisting>
-v            Write a lot of progress messages
-n            Don't remove large objects, just show what would be done
-U username   Username to connect as
-W            Prompt for password
-h hostname   Database server host
-p port       Database server port
  </programlisting>
d84 1
d89 1
d91 3
a93 2
   It then scans through all columns in the database that are of type "oid"
   or "lo", and removes matching entries from the temporary table.
d95 1
d97 2
a98 2
   The remaining entries in the temp table identify orphaned LOs.  These are
   removed.
d104 1
a107 3
  <para>
   <ulink url="http://www.retep.org.uk"></ulink>
  </para>
a110 1

@

