]> begriffs open source - ai-pg/blob - full-docs/txt/vacuumlo.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / vacuumlo.txt
1
2 vacuumlo
3
4    vacuumlo — remove orphaned large objects from a PostgreSQL database
5
6 Synopsis
7
8    vacuumlo [option...] dbname...
9
10 Description
11
12    vacuumlo is a simple utility program that will remove any “orphaned”
13    large objects from a PostgreSQL database. An orphaned large object (LO)
14    is considered to be any LO whose OID does not appear in any oid or lo
15    data column of the database.
16
17    If you use this, you may also be interested in the lo_manage trigger in
18    the lo module. lo_manage is useful to try to avoid creating orphaned
19    LOs in the first place.
20
21    All databases named on the command line are processed.
22
23 Options
24
25    vacuumlo accepts the following command-line arguments:
26
27    -l limit
28           --limit=limit
29           Remove no more than limit large objects per transaction (default
30           1000). Since the server acquires a lock per LO removed, removing
31           too many LOs in one transaction risks exceeding
32           max_locks_per_transaction. Set the limit to zero if you want all
33           removals done in a single transaction.
34
35    -n
36           --dry-run
37           Don't remove anything, just show what would be done.
38
39    -v
40           --verbose
41           Write a lot of progress messages.
42
43    -V
44           --version
45           Print the vacuumlo version and exit.
46
47    -?
48           --help
49           Show help about vacuumlo command line arguments, and exit.
50
51    vacuumlo also accepts the following command-line arguments for
52    connection parameters:
53
54    -h host
55           --host=host
56           Database server's host.
57
58    -p port
59           --port=port
60           Database server's port.
61
62    -U username
63           --username=username
64           User name to connect as.
65
66    -w
67           --no-password
68           Never issue a password prompt. If the server requires password
69           authentication and a password is not available by other means
70           such as a .pgpass file, the connection attempt will fail. This
71           option can be useful in batch jobs and scripts where no user is
72           present to enter a password.
73
74    -W
75           --password
76           Force vacuumlo to prompt for a password before connecting to a
77           database.
78
79           This option is never essential, since vacuumlo will
80           automatically prompt for a password if the server demands
81           password authentication. However, vacuumlo will waste a
82           connection attempt finding out that the server wants a password.
83           In some cases it is worth typing -W to avoid the extra
84           connection attempt.
85
86 Environment
87
88    PGHOST
89           PGPORT
90           PGUSER
91           Default connection parameters.
92
93    This utility, like most other PostgreSQL utilities, also uses the
94    environment variables supported by libpq (see Section 32.15).
95
96    The environment variable PG_COLOR specifies whether to use color in
97    diagnostic messages. Possible values are always, auto and never.
98
99 Notes
100
101    vacuumlo works by the following method: First, vacuumlo builds a
102    temporary table which contains all of the OIDs of the large objects in
103    the selected database. It then scans through all columns in the
104    database that are of type oid or lo, and removes matching entries from
105    the temporary table. (Note: Only types with these names are considered;
106    in particular, domains over them are not considered.) The remaining
107    entries in the temporary table identify orphaned LOs. These are
108    removed.
109
110 Author
111
112    Peter Mount <peter@retep.org.uk>