Re: Multiple Xids in PGPROC?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Multiple Xids in PGPROC?
Date: 2004-05-05 04:02:14
Message-ID: 200405050402.i4542Er23789@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne wrote:
> > I remember going through this. Other backends will use pg_subtrans to
> > know what transactions are in progress. They have to do the standard
> > lookups to find the status of the parent transaction. The backend-local
> > list of xids is needed so the commit can clean up those subtransaction
> > xids so that later transactions don't have to use pg_subtrans.
>
> Is there some solution whereby the common case (99.999% of transactions
> won't be subtransactoins) is fast, and the uncommon case of being in a
> subtransaction is slower?

Yes, we use an unreserved clog status to indicate a pg_subtrans lookup
is required. In non-subtrans cases, no pg_subtrans lookup is required.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2004-05-05 04:03:45 Re: Multiple Xids in PGPROC?
Previous Message Christopher Kings-Lynne 2004-05-05 04:00:12 Re: Multiple Xids in PGPROC?