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

Re: Interpreting pg_stat_replication values

From: Alexander Fortin <alexander(dot)fortin(at)gmail(dot)com>
To: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Interpreting pg_stat_replication values
Date: 2012-01-19 15:04:30
Message-ID: 4F1830FE.3030005@gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On 1/18/12 9:38 AM, Sergey Konoplev wrote:
> With 9.1 you can use
>
> SELECT now() - pg_last_xact_replay_timestamp() AS time_lag;

Hi Sergey,
thank you very much for your suggestion. In the meanwhile we went for a 
check on pg_stat_replication, but we'll add one as you suggest soon on 
the replicas.

By the way, maybe you know where I could find documentation about 
possible values from column "state" on view pg_stat_replication? I can 
see "streaming" when everything is ok, and once I could get just a 
"catchup" while a replica was synching.

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

In response to

Responses

pgsql-admin by date

Next:From: Samuel HwangDate: 2012-01-19 16:56:29
Subject: Re: Help! PostgreSQL stuck at starting up after crash
Previous:From: David HornsbyDate: 2012-01-19 14:30:56
Subject: Re: Help! PostgreSQL stuck at starting up after crash

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