VACUUMLO(1)

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

VACUUMLO(1) ✨ β€” orphaned large object cleanup, but make it fashion πŸ’…

okay so bestie, welcome to vacuumlo β€” the PostgreSQL utility that literally sweeps up orphaned large objects from your database and it's giving housekeeping excellence 🧹✨


SYNOPSIS πŸ’–

vacuumlo [option...] dbname...

DESCRIPTION πŸŽ€

vacuumlo is a simple utility program (iconic, lowkey underrated) that removes any "orphaned" large objects from a PostgreSQL database. An orphaned large object (LO) is considered to be any LO whose OID does not appear in any oid or lo data column of the database. basically it's a whole LO with no home and no one checking for it 😭 not on our watch!

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 era fr fr 🫢

All databases named on the command line are processed. every single one. no skips. periodt πŸ’…


OPTIONS ✨

vacuumlo accepts the following command-line arguments:

  • -l limit, --limit=limit β€” Remove no more than limit large objects per transaction (default 1000). Since the server acquires a lock per LO removed, removing too many LOs in one transaction risks exceeding max_locks_per_transaction. Set the limit to zero if you want all removals done in a single transaction. one giant girlboss transaction, if you will πŸ‘‘
  • -n, --dry-run β€” Don't remove anything, just show what would be done. it's giving window shopping πŸ›οΈ
  • -v, --verbose β€” Write a lot of progress messages. she's chatty and we love that for her 🌸
  • -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 human, no problem πŸ€–
  • -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. saves you a whole round trip, ngl kinda efficient πŸ’«

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. yes bestie, aesthetic diagnostics are a thing 🎨


NOTES πŸ¦‹

vacuumlo works by the following method, and honestly the way this is engineered? ate πŸ’€:

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 β€” ik ik, read that again πŸ‘€). The remaining entries in the temporary table identify orphaned LOs. These are removed. mystery solved, case closed, slay πŸ”₯


AUTHOR 🌟

Peter Mount <peter@retep.org.uk>


and that's the whole page bestie β€” brought to you by PostgreSQL 14.24, dated 2026, the year vacuumlo keeps the vibes immaculate πŸ’œβœ¨ go read the manpage, ily, bye! 🫢