1VACUUMLO(1)              PostgreSQL 13.4 Documentation             VACUUMLO(1)
2
3
4

NAME

6       vacuumlo - remove orphaned large objects from a PostgreSQL database
7

SYNOPSIS

9       vacuumlo [option...] dbname...
10

DESCRIPTION

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

OPTIONS

24       vacuumlo accepts the following command-line arguments:
25
26       -l limit
27       --limit=limit
28           Remove no more than limit large objects per transaction (default
29           1000). Since the server acquires a lock per LO removed, removing
30           too many LOs in one transaction risks exceeding
31           max_locks_per_transaction. Set the limit to zero if you want all
32           removals done in a single transaction.
33
34       -n
35       --dry-run
36           Don't remove anything, just show what would be done.
37
38       -v
39       --verbose
40           Write a lot of progress messages.
41
42       -V
43       --version
44           Print the vacuumlo version and exit.
45
46       -?
47       --help
48           Show help about vacuumlo command line arguments, and exit.
49
50       vacuumlo also accepts the following command-line arguments for
51       connection parameters:
52
53       -h host
54       --host=host
55           Database server's host.
56
57       -p port
58       --port=port
59           Database server's port.
60
61       -U username
62       --username=username
63           User name to connect as.
64
65       -w
66       --no-password
67           Never issue a password prompt. If the server requires password
68           authentication and a password is not available by other means such
69           as a .pgpass file, the connection attempt will fail. This option
70           can be useful in batch jobs and scripts where no user is present to
71           enter a password.
72
73       -W
74       --password
75           Force vacuumlo to prompt for a password before connecting to a
76           database.
77
78           This option is never essential, since vacuumlo will automatically
79           prompt for a password if the server demands password
80           authentication. However, vacuumlo will waste a connection attempt
81           finding out that the server wants a password. In some cases it is
82           worth typing -W to avoid the extra connection attempt.
83

ENVIRONMENT

85       PGHOST
86       PGPORT
87       PGUSER
88           Default connection parameters.
89
90       This utility, like most other PostgreSQL utilities, also uses the
91       environment variables supported by libpq (see Section 33.14).
92
93       The environment variable PG_COLOR specifies whether to use color in
94       diagnostic messages. Possible values are always, auto and never.
95

NOTES

97       vacuumlo works by the following method: First, vacuumlo builds a
98       temporary table which contains all of the OIDs of the large objects in
99       the selected database. It then scans through all columns in the
100       database that are of type oid or lo, and removes matching entries from
101       the temporary table. (Note: Only types with these names are considered;
102       in particular, domains over them are not considered.) The remaining
103       entries in the temporary table identify orphaned LOs. These are
104       removed.
105

AUTHOR

107       Peter Mount <peter@retep.org.uk>
108
109
110
111PostgreSQL 13.4                      2021                          VACUUMLO(1)
Impressum