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<
/></term>
61 <term><option>--no-password<
/></term>
64 Never issue a password prompt. If the server requires password
65 authentication and a password is not available by other means
66 such as a
<filename>.pgpass
</filename> file, the connection
67 attempt will fail. This option can be useful in batch jobs and
68 scripts where no user is present to enter a password.
74 <term><option>-W
</option></term>
77 Force
<application>vacuumlo
</application> to prompt for a
78 password before connecting to a database.
82 This option is never essential, since
83 <application>vacuumlo
</application> will automatically prompt
84 for a password if the server demands password authentication.
85 However,
<application>vacuumlo
</application> will waste a
86 connection attempt finding out that the server wants a password.
87 In some cases it is worth typing
<option>-W<
/> to avoid the extra
94 <term><option>-h
</option> <replaceable>hostname<
/></term>
96 <para>Database server's host.
</para>
101 <term><option>-p
</option> <replaceable>port<
/></term>
103 <para>Database server's port.
</para>
110 <title>Method
</title>
113 First, it builds a temporary table which contains all of the OIDs of the
114 large objects in that database.
118 It then scans through all columns in the database that are of type
119 <type>oid<
/> or
<type>lo<
/>, and removes matching entries from the
124 The remaining entries in the temp table identify orphaned LOs.
130 <title>Author
</title>
133 Peter Mount
<email>peter@retep.org.uk
</email>