Re: Review: Hot standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: Hot standby
Date: 2008-11-22 21:42:19
Message-ID: 1227390139.7015.173.camel@hp_dx2400_1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-11-22 23:10:29 portability of "designated initializers"
Previous Message Tom Lane 2008-11-22 18:10:19 Minor race-condition problem during database startup