Re: Latest version of Hot Standby patch
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2009-01-07T21:56:02Z
Lists: pgsql-hackers
Simon Riggs wrote: > On Wed, 2009-01-07 at 15:43 +0200, Heikki Linnakangas wrote: >> When there's no xids in the procarray, couldn't we just use >> latestCompletedXid instead of calling ReadNewTransactionId()? > > latestCompletedXid is protected by ProcArrayLock so not much difference > between those two. The big difference is that we're already holding ProcArrayLock. You could read the value of latestCompletedXid before releasing ProcArrayLock, and wouldn't need the retry logic. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com