Hackers,

I just figured that if we let LockRelation use GetCurrentTransactionId()
then the wrong thing happens if we let large objects survive
subtransaction commit/abort.  The problem is that when closing a large
object at main transaction commit, which was opened inside a
subtransaction, the code tries to UnlockRelation(pg_largeobject), and
use the main transaction Xid (instead of the subtransaction Xid that it
used to LockRelation()).

So I have changed it to use GetTopTransactionId() instead.  Is that OK
with everybody?

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Maybe there's lots of data loss but the records of data loss are also lost.
(Lincoln Yeoh)


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to