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.com
 PostgreSQL Training, Services and Support


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to