Barry Lind <barry@xythos.com> writes:
> This sounds doable. It would probably also remove the problem I have
> that unlinks of large objects can't be rolled back.
Right, lo_unlink would become something like
"DELETE FROM pg_largeobjects WHERE loid = NNNN"
which is perfectly rollbackable. This would also solve the problem a
number of people have had with accessing thousands of LOs in a single
transaction. (The lock manager tends to run out of shared memory when
asked to keep track of that many table locks :-(.)
This might also make dump/restore of large objects more manageable,
since you'd just be talking about dumping & restoring the contents of
this one table instead of having to look around to see what LOs exist.
A disadvantage I didn't think of before is that it'd take extra work to
implement access protection of LOs --- we do not have any existing way
of protecting individual rows in a table...
regards, tom lane