9

should I call lo_unlink ? A delete didn't remove the object from pg_largeobject.

2 Answers 2

15

You can also clean up large objects from the command-line using

$ vacuumlo -U username databasename
Sign up to request clarification or add additional context in comments.

3 Comments

This is great. It can be found in package postgres-contrib on Fedora distributions.
Sadly AWS RDS is not currently allowing it. But find here my workaround for that disallowance.
Actually vacuumlo can connect to a remote database instance
5

Yes, you need to explicitly call lo_unlink(). I assume you just DELETEd the row that held a reference to it, and that will not remove the actual large object.

If you only ever reference it from the same place, you can always create a trigger to do it automatically for you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.