Re: Logical replication lag in seconds

From: Klaus Darilion <klaus(dot)mailinglists(at)pernau(dot)at>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Logical replication lag in seconds
Date: 2020-02-22 22:25:25
Message-ID: 6107adf5-8cbd-5ac2-8ecd-a0daa983f775@pernau.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2020-02-22 22:32:25 Re: Cannot connect to postgresql-11 from another machine after boot
Previous Message Christophe Pettus 2020-02-22 22:07:41 Re: Can I trigger an action from a coalesce ?