pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Fortin <alexander.fortin@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Interpreting pg_stat_replication values
Date: Mon, 16 Jan 2012 10:25:37 +0100
Message-ID: <4F13ED11.6080001@gmail.com> (raw)

Hi folks,

We've got to monitor replication status (and lag) of a few 9.1.2 
replicas and I'm trying to use values in master's pg_stat_replication to 
do so.

The documentation [1] on postgresql.org doesn't explains exactly the 
internals, especially what the *_location values means. What I'm doing 
right now is to convert replay_location from 64 bit hex to integer and 
trace the growing trend, and looking at that I think it's quite 
impossible to be a WAL filename because the growing rate is way too fast 
(average 100k per second, with spikes of 8G per second).

Anyway, the whole idea is to check "distance" between the actual value 
for the master (still have to figure out where is that) and the replicas 
replay_location, and alert if that value is too high compared to our 
average trends. If you've got better ideas to spare, don't hesitate ;)

Thanks for your time


[1] 
http://www.postgresql.org/docs/9.1/static/monitoring-stats.html#MONITORING-STATS-VIEWS

-- 
Alexander Fortin
http://about.me/alexanderfortin/



view thread (4+ messages)  latest in thread

Message-ID: <4F13ED11.6080001@gmail.com>
Permalink:  ../4F13ED11.6080001@gmail.com/
Also on:    postgresql.org/message-id/4F13ED11.6080001@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alexander.fortin@gmail.com
  Subject: Re: Interpreting pg_stat_replication values
  In-Reply-To: <4F13ED11.6080001@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox