make LockRelation use top transaction ID - Mailing list pgsql-hackers

From Alvaro Herrera
Subject make LockRelation use top transaction ID
Date
Msg-id 20040723030540.GA24393@dcc.uchile.cl
Whole thread Raw
Responses Re: make LockRelation use top transaction ID
List pgsql-hackers
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)



pgsql-hackers by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: [pgsql-hackers-win32] Weird new time zone
Next
From: Gaetano Mendola
Date:
Subject: Re: Fixing PKs and Uniques in tablespaces