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

From Jim Nasby
Subject Re: Checking Postgres Streaming replication delay
Date
Msg-id 302635f1-0ff3-3ab6-f0e6-bbfd99768336@BlueTreble.com
Whole thread Raw
In response to Re: Checking Postgres Streaming replication delay  (Patrick B <patrickbakerbr@gmail.com>)
List pgsql-general
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, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Hardware recommendations?
Next
From: Jim Nasby
Date:
Subject: Re: initdb createuser commands