Re: Latest version of Hot Standby patch

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Latest version of Hot Standby patch
Date: 2009-01-07 21:56:02
Message-ID: 496524F2.1030601@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2009-01-07 22:03:32 Re: [BUGS] BUG #4186: set lc_messages does not work
Previous Message Bruce Momjian 2009-01-07 21:48:17 Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the