Re: Monitoring logical replication - Mailing list pgsql-general

From Ron Johnson
Subject Re: Monitoring logical replication
Date
Msg-id CANzqJaA-s+y7dPUWKkbUXKBu3_WmvU4+ZOmWEzH7su83AT8ohg@mail.gmail.com
Whole thread Raw
In response to Re: Monitoring logical replication  (Shaheed Haque <shaheedhaque@gmail.com>)
Responses Re: Monitoring logical replication
List pgsql-general
On Tue, Jun 18, 2024 at 5:03 AM Shaheed Haque <shaheedhaque@gmail.com> wrote:
Hi all,

Is there an "official" pairing of LSN values on the publication and subscription sides that should be used to track the delta between the two systems? I ask because Google is full of different pairs being used. I tried to identify the highest level interface points exposed, i.e. what is documented on https://www.postgresql.org/docs/current/replication-origins.html, the pg_stat_subscription table, the pg_stat_publication table and the pg_current_wal_lsn() function on the publisher, but these seem to be barely used.

The attached scripts (whose guts I took from a Stack Exchange post) might be a good starting point.  It certainly works for physical replication!
 
P.S. On a related note, I see a (stalled?) discussion on providing LSN -> timestamp conversion, I'd just like to say that something like that would be very useful.
 
Out of curiosity, how does that work?  Is an instance's initial LSN really based on Epoch?
Attachment

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: DROP COLLATION vs pg_collation question
Next
From: Karsten Hilbert
Date:
Subject: Re: DROP COLLATION vs pg_collation question