Hi Satish,
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_loc
Hi Satish,
SELECT pg_current_xlog_location(); command is applicable from 8.4 version
and select pg_last_xlog_receive_location(); command is applicable from 9.0
version.
select now() - pg_last_xact_replay_timestamp(); command is applicable from
9.1 version.
*Monitoring Streaming replication:*
F