1 <!-- $PostgreSQL: pgsql/doc/src/sgml/vacuumlo.sgml,v 1.2 2007/12/06 04:12:10 tgl Exp $ -->
4 <title>vacuumlo</title>
6 <indexterm zone="vacuumlo">
7 <primary>vacuumlo</primary>
11 <application>vacuumlo</> is a simple utility program that will remove any
12 <quote>orphaned</> large objects from a
13 <productname>PostgreSQL</> database. An orphaned large object (LO) is
14 considered to be any LO whose OID does not appear in any <type>oid</> or
15 <type>lo</> data column of the database.
19 If you use this, you may also be interested in the <function>lo_manage</>
20 trigger in <filename>contrib/lo</> (see <xref linkend="lo">).
21 <function>lo_manage</> is useful to try
22 to avoid creating orphaned LOs in the first place.
29 vacuumlo [options] database [database2 ... databaseN]
33 All databases named on the command line are processed. Available options
39 <term><option>-v</option></term>
41 <para>Write a lot of progress messages</para>
46 <term><option>-n</option></term>
48 <para>Don't remove anything, just show what would be done</para>
53 <term><option>-U</option> <replaceable>username</></term>
55 <para>Username to connect as</para>
60 <term><option>-W</option></term>
62 <para>Force prompt for password (generally useless)</para>
67 <term><option>-h</option> <replaceable>hostname</></term>
69 <para>Database server's host</para>
74 <term><option>-p</option> <replaceable>port</></term>
76 <para>Database server's port</para>
86 First, it builds a temporary table which contains all of the OIDs of the
87 large objects in that database.
91 It then scans through all columns in the database that are of type
92 <type>oid</> or <type>lo</>, and removes matching entries from the
97 The remaining entries in the temp table identify orphaned LOs.
103 <title>Author</title>
106 Peter Mount <email>peter@retep.org.uk</email>