Re: Streaming Recovery - Automated Monitoring - Mailing list pgsql-general

From Rajesh Kumar Mallah
Subject Re: Streaming Recovery - Automated Monitoring
Date
Msg-id AANLkTikAGiPX4WR7im7umxv2-k4Jb5idpPLZ506ZmoqM@mail.gmail.com
Whole thread Raw
In response to Streaming Recovery - Automated Monitoring  (Karl Denninger <karl@denninger.net>)
Responses Re: Streaming Recovery - Automated Monitoring
List 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.

pgsql-general by date:

Previous
From: Karl Denninger
Date:
Subject: Streaming Recovery - Automated Monitoring
Next
From: Karl Denninger
Date:
Subject: Re: Streaming Recovery - Automated Monitoring