VACUUMLO(1)

πŸ“¦ version 16.15, in opensuse-leap 16.0

πŸ’… 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:

  • -l limit, --limit=limit β€” remove no more than limit large objects per transaction (default 1000). and listen, this one matters: since the server acquires a lock per LO removed, removing too many LOs in one transaction risks exceeding max_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 the vacuumlo version and exit.
  • -?, --help β€” show help about vacuumlo command line arguments, and exit.

vacuumlo also accepts the following command-line arguments for connection parameters:

  • -h host, --host=host β€” database server's host.
  • -p port, --port=port β€” database server's port.
  • -U username, --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 .pgpass file, 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 β€” force vacuumlo to 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 🌈

  • PGHOST
  • PGPORT
  • PGUSER

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 πŸ’–πŸ§š