aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-03-20 19:05:08 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-03-20 19:05:44 -0400
commit64c604898e812aa93c124c666e8709fff1b8dd26 (patch)
tree77fad7849276fa6c8e3396b256279222c81ec509 /doc/src
parent9d23a70d513aa1312135d6cedd444e7e3e933edb (diff)
downloadpostgresql-64c604898e812aa93c124c666e8709fff1b8dd26.tar.gz
postgresql-64c604898e812aa93c124c666e8709fff1b8dd26.zip
Improve the -l (limit) option recently added to contrib/vacuumlo.
Instead of just stopping after removing an arbitrary subset of orphaned large objects, commit and start a new transaction after each -l objects. This is just as effective as the original patch at limiting the number of locks used, and it doesn't require doing the OID collection process repeatedly to get everything. Since the option no longer changes the fundamental behavior of vacuumlo, and it avoids a known server-side limitation, enable it by default (with a default limit of 1000 LOs per transaction). In passing, be more careful about properly quoting the names of tables and fields, and do some other cosmetic cleanup.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/vacuumlo.sgml26
1 files changed, 15 insertions, 11 deletions
diff --git a/doc/src/sgml/vacuumlo.sgml b/doc/src/sgml/vacuumlo.sgml
index 0ae39c71d2c..97753de6c0c 100644
--- a/doc/src/sgml/vacuumlo.sgml
+++ b/doc/src/sgml/vacuumlo.sgml
@@ -50,19 +50,22 @@ vacuumlo [options] database [database2 ... databaseN]
</varlistentry>
<varlistentry>
- <term><option>-U</option> <replaceable>username</></term>
+ <term><option>-l</option> <replaceable>limit</></term>
<listitem>
- <para>User name to connect as.</para>
+ <para>
+ Remove no more than <replaceable>limit</> large objects per
+ transaction (default 1000). Since the server acquires a lock per LO
+ removed, removing too many LOs in one transaction risks exceeding
+ <xref linkend="guc-max-locks-per-transaction">. Set the limit to
+ zero if you want all removals done in a single transaction.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-l</option> <replaceable>limit</></term>
+ <term><option>-U</option> <replaceable>username</></term>
<listitem>
- <para>
- Stop after removing LIMIT large objects. Useful to avoid
- exceeding <xref linkend="guc-max-locks-per-transaction">.
- </para>
+ <para>User name to connect as.</para>
</listitem>
</varlistentry>
@@ -120,18 +123,19 @@ vacuumlo [options] database [database2 ... databaseN]
<title>Method</title>
<para>
- First, it builds a temporary table which contains all of the OIDs of the
- large objects in that database.
+ First, <application>vacuumlo</> builds a temporary table which contains all
+ of the OIDs of the large objects in the selected 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.
+ temporary table. (Note: only types with these names are considered;
+ in particular, domains over them are not considered.)
</para>
<para>
- The remaining entries in the temp table identify orphaned LOs.
+ The remaining entries in the temporary table identify orphaned LOs.
These are removed.
</para>
</sect2>