Adam Haberlach <adam(at)newsnipple(dot)com> writes:
> Is there any simple way for me to get a list of all large objects
> in a database, so I can see if there are actually rows referring to them
> and delete the ones that were not unlinked earlier?
Look at the vacuum_lo contrib module.
BTW, I believe lo_unlink doesn't need to be in a transaction block,
only lo_open/read/write/close do.
regards, tom lane