Re: Logical replication lag in seconds - Mailing list pgsql-general

From Klaus Darilion
Subject Re: Logical replication lag in seconds
Date
Msg-id 6107adf5-8cbd-5ac2-8ecd-a0daa983f775@pernau.at
Whole thread Raw
In response to Re: Logical replication lag in seconds  (Michael Lewis <mlewis@entrata.com>)
List pgsql-general
Hi Michael!

Am 21.02.2020 um 21:24 schrieb Michael Lewis:
> I am very interested in this discussion. We settled a table with a 
> single timestamp field that a script updates every minute with NOW() so 
> that we can check the timestamp of that table on the replica, assuming 
> the clocks are synced, then we will be able to compute the lag.

I have a similar workaround at the moment. But it is more a hack than a 
nice solution, ie. I also have to store the last value locally to have 
the status also available if a replica is temporarily not reachable.

Hence it would be great if the information could be retrieved from 
WAL/replication internals.

regards
Klaus



pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Can I trigger an action from a coalesce ?
Next
From: "Peter J. Holzer"
Date:
Subject: Re: Cannot connect to postgresql-11 from another machine after boot