Re: Streaming replication status - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Streaming replication status
Date
Msg-id 3398.1263307190@sss.pgh.pa.us
Whole thread Raw
In response to Re: Streaming replication status  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> On Tue, Jan 12, 2010 at 08:22, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>> Maybe we should just change the existing pg_current_xlog_location()
>> function to return that when recovery is in progress. It currently
>> throws an error during hot standby.

> Not sure. I don't really like to monitor functions that return
> different things depending on a scenario.

Yeah.  We should only use that function if we can define it to mean
something on the slave that is very close to what it means on the
master.  Otherwise, pick another name.

It seems to me that we should have at least two functions available
on the slave: latest xlog location received and synced to disk by
walreceiver (ie, we are guaranteed to be able to replay up to here);
and latest xlog location actually replayed (ie, the state visible
to queries on the slave).  The latter perhaps could be
pg_current_xlog_location().
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: Typed tables
Next
From: Andrew Chernow
Date:
Subject: Re: Typed tables