Newb question here. I have streaming replication working with 9.2 and I'm using Bucardo's check_postgres.pl to monitor replication. I see that it runs this query on the slave:
SELECT pg_last_xlog_receive_location() AS receive, pg_last_xlog_replay_location() AS replay
That returns hex, which is then converted to a number in the script. SELECT pg_last_xlog_receive_location() AS receive, pg_last_xlog_replay_location() AS replay
How do I determine a meaningful alert threshold for that value? Is there a reliable way to monitor replication lag in seconds? How do other people handle this?