Re: Latest version of Hot Standby patch - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Latest version of Hot Standby patch
Date
Msg-id 1231418282.18005.162.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Latest version of Hot Standby patch  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Thu, 2009-01-08 at 12:12 +0200, Heikki Linnakangas wrote:

> >> Sounds good to me then. Will rework.
> > 
> > Applies brakes suddenly.
> > 
> > I realise this is subtle trap I almost fell into the first time I coded
> > it. The function is retrieving GetRunningTransactionData() and so we are
> > interested in the latest running xid, not the latest completed xid. The
> > latter is sufficient for snapshots, but the information derived by
> > GetRunningTransactionData() is used to maintain UnobservedXids.
> 
> If there's no transactions running, latest completed xid is just what we 
> need. 

> When there is any transactions in procarray, we should take the 
> max xid of those, as the patch already does.

OK, I don't now see the need for the special case in the way I've done
it. There could still be problems there, but if there are they should
apply to all cases not just the no transactions running case.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Latest version of Hot Standby patch
Next
From: Peter Eisentraut
Date:
Subject: Re: about truncate