Re: Checking Postgres Streaming replication delay - Mailing list pgsql-general

From Patrick B
Subject Re: Checking Postgres Streaming replication delay
Date
Msg-id CAJNY3isOdVLMuUEUpwj3k=b6OUpjSEcyeqK3EzN4PdCAAbe4vQ@mail.gmail.com
Whole thread Raw
In response to Re: Checking Postgres Streaming replication delay  (Venkata B Nagothi <nag1010@gmail.com>)
Responses Re: Checking Postgres Streaming replication delay  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-general


2016-10-31 15:54 GMT+13:00 Venkata B Nagothi <nag1010@gmail.com>:

On Mon, Oct 31, 2016 at 11:57 AM, Patrick B <patrickbakerbr@gmail.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!!!!

pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: Way to quickly detect if database tables/columns/etc. were modified?
Next
From: Evan Martin
Date:
Subject: Re: Way to quickly detect if database tables/columns/etc. were modified?