VACUUMLO(1)

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

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

  • -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. (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 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 β€” nobody's home, don't knock πŸšͺ
  • -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. Save yourself the extra round trip, bestie ✨


🌈 ENVIRONMENT 🌈

  • PGHOST
  • PGPORT
  • PGUSER

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 πŸ’œ