Re: Latest version of Hot Standby patch

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Latest version of Hot Standby patch
Date: 2009-01-08 12:38:02
Message-ID: 1231418282.18005.162.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.com
PostgreSQL Training, Services and Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-01-08 12:39:52 Re: about truncate
Previous Message Simon Riggs 2009-01-08 11:52:20 Re: Latest version of Hot Standby patch