Re: Correct query to check streaming replication lag

From: Granthana Biswas <granthana(at)zedo(dot)com>
To: Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com>
Cc: Ray Stell <stellr(at)vt(dot)edu>, PostgreSQL General Discussion Forum <pgsql-general(at)postgresql(dot)org>
Subject: Re: Correct query to check streaming replication lag
Date: 2014-01-21 06:11:52
Message-ID: CAACh-pVnRTesA5KJDs5MNJoGZCxF=CCRQ5bRmUwB2vV+GbX=Gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes byte lag as well as it makes more sense.

Regards,
Granthana

Regards,
Granthana

On Tue, Jan 21, 2014 at 11:03 AM, Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com>wrote:

>
>>
>> We are already using the following query:
>>
>> SELECT CASE WHEN pg_last_xlog_receive_location(
>> ) = pg_last_xlog_replay_location() THEN 0 ELSE EXTRACT (EPOCH FROM now()
>> - pg_last_xact_replay_timestamp()) END AS log_delay;
>>
>> This is (delay) not the correct thing to monitor.
>
> We cannot use pg_xlog_location_diff as we use postgresql 9.1.
>>
>> You can still use the other two methods I mentioned.
>
>
> Regards
> Sameer
> Ashnik Pte Ltd, Singapore
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2014-01-21 06:49:24 Re: Correct query to check streaming replication lag
Previous Message Sameer Kumar 2014-01-21 05:33:41 Re: Correct query to check streaming replication lag