I am an oracle dba and recently started learning postgres database administration. In one of our postgres databases, pg_largeobject table is of 30G and I want to reclaim disk space by unlinking and vacuuming the large objects which are not used by any tables in the database. For this, I would like to know the tables in the database which are using these large objects. Is there any query or procedure to achieve this?
Update: I tried using vacuumlo but it returned 0 objects to be removed. It means that the large objects are not orphaned but we don't have any table in the database which references majority of the objects in the pg_largeobject table. Then how come these objects are not orphaned?
pg_largeobjecttable? How many FK are there and how is the FK delete action defined?