Re: Streaming replication status
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Fujii Masao <masao.fujii@gmail.com>, Greg Smith <greg@2ndQuadrant.com>, Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>, Josh Berkus <josh@agliodbs.com>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-03-22T22:56:33Z
Lists: pgsql-hackers
Simon Riggs wrote:
> On Thu, 2010-01-14 at 17:33 +0900, Fujii Masao wrote:
>
> > I added two new functions;
> >
> > (1) pg_last_xlog_receive_location() reports the last WAL location received
> > and synced by walreceiver. If streaming replication is still in progress
> > this will increase monotonically. If streaming replication has completed
> > then this value will remain static at the value of the last WAL record
> > received and synced. When the server has been started without a streaming
> > replication then the return value will be InvalidXLogRecPtr (0/0).
> >
> > (2) pg_last_xlog_replay_location() reports the last WAL location replayed
> > during recovery. If recovery is still in progress this will increase
> > monotonically. If recovery has completed then this value will remain
> > static at the value of the last WAL record applied. When the server has
> > been started normally without a recovery then the return value will be
> > InvalidXLogRecPtr (0/0).
>
> I just noticed that these functions have almost the same name as
> functions I wrote for Hot Standby and Heikki removed from that patch.
> The function code and docs are 99% identical.
>
> I'm happy that the code was used and it is BSD, though it does seem
> strange to have this credited to others in the release notes.
Sorry, release notes updated:
Add <link
linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</></link>
and <function>pg_last_xlog_replay_location()</>, which
can be used to monitor standby server <acronym>WAL</>
activity (Simon)
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do