Re: Checking Postgres Streaming replication delay

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Patrick B <patrickbakerbr(at)gmail(dot)com>, 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-11-02 22:45:17
Message-ID: 302635f1-0ff3-3ab6-f0e6-bbfd99768336@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2016-11-02 23:05:08 Re: initdb createuser commands
Previous Message John R Pierce 2016-11-02 22:19:35 Re: Hardware recommendations?