From: | Venkat Balaji <venkat(dot)balaji(at)verse(dot)in> |
---|---|
To: | Stuart Bishop <stuart(at)stuartbishop(dot)net> |
Cc: | "List, Postgres" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Measuring replication lag time |
Date: | 2012-02-22 12:48:59 |
Message-ID: | CAFrxt0gpF4sgFjj+b0MUqkV0o7k7LRvG4v2zg--9vXoth3HMQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Feb 22, 2012 at 5:40 PM, Stuart Bishop <stuart(at)stuartbishop(dot)net>wrote:
Hi.
>
> I need to measure how far in the past a hot standby is, async
> streaming replication.
>
> On the Hot Standby, "select
> age(current_timestamp,pg_last_xact_replay_timestamp())" gets me this
> (or close enough for my purposes - I understand that if there are no
> updates, there are no logs to replay and the lag time will increase).
>
> Is there some way to get this same information on the master?
> pg_stat_replication contains the log information, but I can't see how
> to map this to a timestamp.
>
> Is there a better way of measuring this?
>
Comparing "pg_controldata" output on prod and standby might help you with
this.
Thanks,
VB
From | Date | Subject | |
---|---|---|---|
Next Message | pinyo_j | 2012-02-22 13:02:39 | Problem when reinstall postgresql value pg_config not update!! |
Previous Message | Daniele Varrazzo | 2012-02-22 12:18:16 | Re: python3 module for accessing postgresql |