VACUUMLO(1)
π VACUUMLO(1) β the PostgreSQL 13.23 manual page, but make it make sense
okay so bestie, welcome to vacuumlo β that's the VACUUMLO(1) page from the PostgreSQL 13.23 docs, and I'm about to make it slay for you π«Ά
β¨ NAME β¨
vacuumlo β remove orphaned large objects from a PostgreSQL database π§Ήπ
β¨ SYNOPSIS β¨
vacuumlo [option...] dbname...
π¦ DESCRIPTION π¦
vacuumlo is a simple lil utility program that removes any "orphaned" large objects from a PostgreSQL database. And what even is an orphaned large object (LO)? It's literally any LO whose OID doesn't appear in any oid or lo data column of the database. No home, no family, no references β just floating around. We're cleaning house π
If you use this, you may also be interested in the lo_manage trigger in the lo module. lo_manage is useful to try to avoid creating orphaned LOs in the first place β prevention is self-care, periodt π
All databases named on the command line are processed. Every single one, no cap.
πΈ OPTIONS πΈ
vacuumlo accepts the following command-line arguments:
-llimit,--limit=limitβ Remove no more than limit large objects per transaction (default1000). Since the server acquires a lock per LO removed, removing too many LOs in one transaction risks exceedingmax_locks_per_transaction. Set the limit to zero if you want all removals done in a single transaction. (zero = all in, chaotic queen energy π)-n,--dry-runβ Don't remove anything, just show what would be done. Manifesting without committing, honestly iconic π-v,--verboseβ Write a lot of progress messages. She's chatty and we love her π¬-V,--versionβ Print thevacuumloversion and exit.-?,--helpβ Show help aboutvacuumlocommand line arguments, and exit.
vacuumlo also accepts the following command-line arguments for connection parameters:
-hhost,--host=hostβ Database server's host.-pport,--port=portβ Database server's port.-Uusername,--username=usernameβ User name to connect as.-w,--no-passwordβ Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a.pgpassfile, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password β nobody's home, don't knock πͺ-W,--passwordβ Forcevacuumloto prompt for a password before connecting to a database.
This option is never essential, since vacuumlo will automatically prompt for a password if the server demands password authentication. However, vacuumlo will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Save yourself the extra round trip, bestie β¨
π ENVIRONMENT π
PGHOSTPGPORTPGUSER
These are default connection parameters. π
This utility, like most other PostgreSQL utilities, also uses the environment variables supported by libpq (see Section 33.14).
The environment variable PG_COLOR specifies whether to use color in diagnostic messages. Possible values are always, auto and never. (Color = aesthetic. Obviously π¨)
π NOTES π
vacuumlo works by the following method: First, vacuumlo builds a temporary table which contains all of the OIDs of the large objects in the selected database. It then scans through all columns in the database that are of type oid or lo, and removes matching entries from the temporary table. (Note: Only types with these names are considered; in particular, domains over them are not considered.) The remaining entries in the temporary table identify orphaned LOs. These are removed. Bye bestie, don't let the door hit you π
fr fr, "domains over them are not considered" is the kind of detail that sneaks up on you β read it twice so nothing surprises you later π
π AUTHOR π
Peter Mount <peter@retep.org.uk>
and that's the whole page, bestie β no skips, no shortcuts π«Ά this was PostgreSQL 13.23 documentation, from 2025, VACUUMLO(1), and honestly? she ate. go clean up those orphaned LOs, mwah π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13-contrib 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13-contrib 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13-contrib 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13-contrib 13.23-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms