Alvaro Herrera <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings