Monitoring Streaming Replication in 9.2

From: maillists0(at)gmail(dot)com
To: PostgreSQL pg-general List <pgsql-general(at)postgresql(dot)org>
Subject: Monitoring Streaming Replication in 9.2
Date: 2014-05-16 16:09:33
Message-ID: CAB+OxSCYsK3p2vY5q5LFtdWGAXmZ+H5g9+LGnGmt-jeaHS2SGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

My question is this: what does that number represent? Is it just the log
position? If so, how does the log position translate to queries? Does one
log position = one query? (I did say this was a newb question.)

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?

Browse pgsql-general by date

  From Date Subject
Next Message dinesh kumar 2014-05-16 17:49:17 Re: Monitoring Streaming Replication in 9.2
Previous Message J Adams 2014-05-16 16:07:40 Monitoring Streaming Replication in 9.2