Skip to content
scrambled
Software Engineering Flashcard

What happens when you delete a row that references a PostgreSQL Large Object?

Concepts Deckdatabase Tags
  • database

Question

What happens when you delete a row that references a PostgreSQL Large Object?

Answer

Nothing. The Large Object is NOT deleted. OIDs are dumb references with no refcounting. You must explicitly call lo_unlink(oid). Orphaned objects accumulate silently. PostgreSQL ships vacuumlo to clean them up.