Re: Checking Postgres Streaming replication delay

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: Venkata B Nagothi <nag1010(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Checking Postgres Streaming replication delay
Date: 2016-10-31 20:39:01
Message-ID: CAJNY3isOdVLMuUEUpwj3k=b6OUpjSEcyeqK3EzN4PdCAAbe4vQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2016-10-31 15:54 GMT+13:00 Venkata B Nagothi <nag1010(at)gmail(dot)com>:

>
> On Mon, Oct 31, 2016 at 11:57 AM, Patrick B <patrickbakerbr(at)gmail(dot)com>
> wrote:
>
>> Hi guys,
>>
>> I'm using this query to measure the delay between a Master and a
>> Streaming Replication Slave server, using PostgreSQL 9.2.
>>
>> SELECT
>>> pg_last_xlog_receive_location() receive,
>>> pg_last_xlog_replay_location() replay,
>>> (
>>> extract(epoch FROM now()) -
>>> extract(epoch FROM pg_last_xact_replay_timestamp())
>>> )::int lag;
>>
>>
>> In your opinion, is that right?
>>
>> Yes, thats right.
>
> Regards,
>
> Venkata B N
> Database Consultant
>
>

Thanks!!!!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Evan Martin 2016-10-31 20:41:17 Re: Way to quickly detect if database tables/columns/etc. were modified?
Previous Message Melvin Davidson 2016-10-31 19:26:22 Re: Way to quickly detect if database tables/columns/etc. were modified?