Re: Review: Hot standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Review: Hot standby
Date
Msg-id 1227390139.7015.173.camel@hp_dx2400_1
Whole thread Raw
In response to Re: Review: Hot standby  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Responses Re: Review: Hot standby
List pgsql-hackers
On Fri, 2008-11-21 at 14:17 +0530, Pavan Deolasee wrote:

> I wonder if there is corner case 

I remain on the lookout for these, so thanks for thinking of this.

> below where there are no WAL records to replay during standby
> recovery. Specifically, that may cause IsRunningXactDataValid() to
> return false since latestObservedXid remains set to
> InvalidTransactionId and that prevents postmaster from serving
> read-only clients.

I don't think so, because this section of code is only called if there
is redo to perform. If no redo, we never get here.

There certainly is no guarantee that the correct conditions will ever
exist to allow read-only access. If snapshots overflow consistently over
a long period then the correct state will never be reached. That is very
unlikely, but possible. I could prevent the delay, but then the code
would so seldom run that it would probably have bugs, so it didn't seem
worth trying to plug the gap.

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



pgsql-hackers by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Logging auto_explain outputs to another log file
Next
From: Tom Lane
Date:
Subject: Re: Logging auto_explain outputs to another log file