On 10/31/16 3:39 PM, Patrick B wrote:
|(
||extract(epoch FROMnow())-
||extract(epoch FROMpg_last_xact_replay_timestamp())
||)::int lag|
You could certainly simplify it though...
extract(epoch FROM now()-pg_last_xact_replay_timestamp())
--
Jim Nasby, Data Architect, Blue Treble Consulting,
2016-10-31 15:54 GMT+13:00 Venkata B Nagothi :
>
> On Mon, Oct 31, 2016 at 11:57 AM, Patrick B
> 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.
On Mon, Oct 31, 2016 at 11:57 AM, Patrick B
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,
>>
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