Skip site navigation (1) Skip section navigation (2)

Interpreting pg_stat_replication values

From: Alexander Fortin <alexander(dot)fortin(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Interpreting pg_stat_replication values
Date: 2012-01-16 09:25:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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 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


Alexander Fortin


pgsql-admin by date

Next:From: Frank LanitzDate: 2012-01-16 14:41:29
Subject: LDAP vs. local users
Previous:From: Tom LaneDate: 2012-01-15 17:28:21
Subject: Re: pg_upgrade: error when migrating from 8.3 to 9.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group