On Fri, 2007-09-07 at 06:36 +0200, Florian G. Pflug wrote:
> Tom Lane wrote:
> > "Florian G. Pflug" <[EMAIL PROTECTED]> writes:
> >> So I believe you're right, and we can skip taking the lock in the no
> >> xid case
> - I actually think with just a little bit of more work, we
> >> can go even further, and get rid of the ReadNewTransactionId() call
> >> completely during snapshotting.
> > [ squint... ] This goes a bit far for me. In particular, I think this
> > will fail in the edge case when there are no live XIDs visible in
> > ProcArray. You cannot go back and do ReadNewTransactionId afterward,
> > at least not without re-scanning the ProcArray a second time, which
> > makes it at best a questionable win.
> Why would it?
I think the additional suggestion goes a bit too far. You may be right,
but I don't want to change the transaction system in advanced ways this
close to the next release. We may have difficulty spotting bugs in that
thinking during beta.
lazy XID assignment will reduce the number of times
GetNextTransactionId() is called and if we also avoid taking the
ProcArrayLock for CommitTransaction() then we will have significantly
reduced contention for mixed workloads (i.e. most real ones).
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings