Create 2 parallel threads, each with it's own connection, and serializable transaction:
thread_1 - read large_object_1, wait signal_1, continue read large_object_1, commit
thread_2 - delete large_object_1, commit, set signal_1
After signal_1 is set thread_1 will throw exception "Large object doesn't exist", between reads.
Read: http://www.postgresql.org/docs/8.4/stat ... faces.html - 31.3.4. Opening an Existing Large Object
You driver doesn't allow to set lo_open mode.Reading from a descriptor opened with INV_WRITE returns data that reflects all writes of other committed transactions as well as writes of the current transaction. This is similar to the behavior of SERIALIZABLE versus READ COMMITTED transaction modes for ordinary SQL SELECT commands.