make LockRelation use top transaction ID

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: make LockRelation use top transaction ID
Date: 2004-07-23 03:05:40
Message-ID: 20040723030540.GA24393@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-07-23 03:14:27 Re: [HACKERS] Tutorial
Previous Message Robert Treat 2004-07-23 02:40:45 Re: [HACKERS] Tutorial