Gregory Gimenez <gimenez@xxxxxxxxxxxxxxxx> writes: > So, we try to get rid of this particular image by first deleting the > picture row with this corresponding oid and then making a vaccumdb + > reindex to delete the reference in the pg_largeoject but still the > largeobject is there. Well, yeah, you didn't delete the large object. Since you're restoring the whole DB, why don't you just drop and recreate the database? If you really don't want to do that, contrib/vacuumlo might help you, or in the longer term consider using the contrib/lo datatype instead of bare OIDs for referencing large objects. BTW, using -i with pg_dump or pg_restore on a routine basis is extremely bad practice. It will bite you eventually. If pg_dump doesn't want to play with your server version, there is probably a good reason, and you should not override it without knowing exactly what you are doing and why it's safe for the particular combination of versions. regards, tom lane