This article explains the technical risks associated with PostgreSQL large objects (LOs), specifically the accumulation of orphaned entries in system catalogs. It provides a guide for monitoring these objects and performing safe cleanup using the vacuumlo utility and lo_manage triggers to avoid maintenance failures.
Key points
Large objects are stored in dedicated catalog tables and are not automatically managed by standard autovacuum processes.
Orphaned large objects can cause major version upgrade failures and performance degradation due to OID contention.
The vacuumlo utility should be used with caution, particularly regarding domain-type columns which may not be visible to the tool.
Managing large objects requires manual cleanup routines or the use of lo_manage triggers to maintain database health.