Re: Cleaning up recovery from subtransaction start failure - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cleaning up recovery from subtransaction start failure
Date
Msg-id 28195.1095124901@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cleaning up recovery from subtransaction start failure  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> Just to be sure I understand your proposal: the idea is that a
> subtransaction would not have a TransactionId assigned right away, but
> instead the first call to GetCurrentTransactionId in the subxact would
> assign it (and call SubTransSetParent and XactLockTableInsert).  Is this
> right?

Right.  The theory being that a subxact that hasn't yet done anything
to global database state need not own an XID.  We had optimized on the
assumption that most subxacts would eventually need an XID, but in
hindsight I'm not sure why we thought that must be so.  In any case,
I can't see any significant performance cost associated with postponing
the assignment, so why not?

> IMHO it definitely has to be in 8.0, or we risk too much in Xid
> wraparound, especially when lots of people is starting to use Pg on high
> volume, high update environments.

I'm leaning the same way.  I'll work on this tomorrow unless someone
raises a good objection before then.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Cleaning up recovery from subtransaction start failure
Next
From: Mischa Sandberg
Date:
Subject: Re: Indexed views?