For the records - with a simple script I hacked a solution which is
purely based on the server.
1. Create a table to track the timestamp of an lsn:
CREATE TABLE lsn2date(
lsn pg_lsn PRIMARY KEY,
seen timestamp NOT NULL DEFAULT NOW()
);
CREATE ROLE replication_lag_user WITH LOGIN PASSWORD 'x
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, the
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.
Hello!
I currently use Slony for replication and want to switch to logical
replication. With Slony I was aware of the replication lag of each slave
in seconds. This info was available regardless if a slave was online or
offline.
For my application I need to know the "delay" of all replicas, wethe