What should one do when one wishes to replace a large object with a new large object. An example would be to update an uploaded file with a new version.
One way would presumably be to create a new large object, update links to the new oid, and then unlink the old object. But is it reasonable to instead replace the existing data, say, by writing over the original (perhaps truncating the contents first)?
FWIW I'd be doing this in JDBC and for PostgreSQL 9.4.