Re: Streaming Recovery - Automated Monitoring

From: Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>
To: Karl Denninger <karl(at)denninger(dot)net>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Streaming Recovery - Automated Monitoring
Date: 2010-10-03 04:40:24
Message-ID: AANLkTikAGiPX4WR7im7umxv2-k4Jb5idpPLZ506ZmoqM@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I hope u checked point #11
http://wiki.postgresql.org/wiki/Streaming_Replication#How_to_Use

- *11.* You can calculate the replication lag by comparing the current
WAL write location on the primary with the last WAL location
received/replayed by the standby. They can be retrieved using *
pg_current_xlog_location* on the primary and the *
pg_last_xlog_receive_location*/*pg_last_xlog_replay_location* on the
standby, respectively.

$ psql -c "SELECT pg_current_xlog_location()" -h192.168.0.10 (primary host)
pg_current_xlog_location
--------------------------
0/2000000
(1 row)

$ psql -c "select pg_last_xlog_receive_location()" -h192.168.0.20 (standby host)
pg_last_xlog_receive_location
-------------------------------
0/2000000
(1 row)

$ psql -c "select pg_last_xlog_replay_location()" -h192.168.0.20 (standby host)
pg_last_xlog_replay_location
------------------------------
0/2000000
(1 row)

Regds
Rajesh Kumar Mallah.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karl Denninger 2010-10-03 05:07:11 Re: Streaming Recovery - Automated Monitoring
Previous Message Karl Denninger 2010-10-03 03:47:27 Streaming Recovery - Automated Monitoring