VACUUMLO(1)
π VACUUMLO(1) β the orphan-LO cleanup girlie π
okay so welcome to vacuumlo, bestie β this is a PostgreSQL 16.15 era man page and honestly it's giving "small utility, big cleanup energy" β¨
πΈ NAME πΈ
vacuumlo β remove orphaned large objects from a PostgreSQL database π§Ήπ
π¦ SYNOPSIS π¦
vacuumlo [option...] dbname...
β¨ DESCRIPTION β¨
okay so vacuumlo is literally the simplest little utility program and its whole personality is removing any "orphaned" large objects from a PostgreSQL database. no cap.
and what even is an orphaned large object (LO)? an orphaned LO is considered to be any LO whose OID does not appear in any oid or lo data column of the database. that's it. that's the whole definition. it's giving "nobody claimed you, so you're outta here" π
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 girlie behavior, love that for you π«Ά
all databases named on the command line are processed. all of them. every single one. π
π OPTIONS π
vacuumlo accepts the following command-line arguments:
-llimit,--limit=limitβ remove no more than limit large objects per transaction (default1000). and listen, this one matters: since the server acquires a lock per LO removed, removing too many LOs in one transaction risks exceedingmax_locks_per_transactionπ so set the limit to zero if you want all removals done in a single transaction. zero means "yolo, one transaction", you've been warned bestie.-n,--dry-runβ don't remove anything, just show what would be done. window shopping ποΈ iconic, lowkey the safe way to start.-v,--verboseβ write a lot of progress messages. she's chatty and honestly? same.-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 π€ no humans, no prompts, no drama.-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. efficiency slay π
π ENVIRONMENT π
PGHOSTPGPORTPGUSER
default connection parameters.
this utility, like most other PostgreSQL utilities, also uses the environment variables supported by libpq (see Section 34.15).
the environment variable PG_COLOR specifies whether to use color in diagnostic messages. possible values are always, auto and never. cute messages in color? yes please π¨
π NOTES π
okay so here's the actual tea on how vacuumlo works β
first, vacuumlo builds a temporary table which contains all of the OIDs of the large objects in the selected database. then it 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. and those get removed. periodt.
π AUTHOR π
Peter Mount <peter@retep.org.uk>
that's the whole page bestie, you ate that πβ¨ and before you go β this was PostgreSQL 16.15 documentation, dated 2026, and yes the page itself is literally called VACUUMLO(1). mwah ππ§
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16-contrib 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16-contrib 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16-contrib 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16-contrib 16.15-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