Thread: Logical replication

Logical replication

From
Konireddy Rajashekar
Date:
Hi Team,

Is there a way or query to measure replication lag on logical replication setup in terms of time ? 

Thanks 
Raj 

Re: Logical replication

From
Michael Lewis
Date:
There is nothing native to compute this. This was asked a month or so ago. The best the poster came up with was a regular query on master DB which updates a timestamptz field. Assuming master and slave have clocks in sync, it is simple to compute the lag from that.

Re: Logical replication

From
Konireddy Rajashekar
Date:
Thanks Michael.

On Mon, 6 Apr, 2020, 9:49 PM Michael Lewis, <mlewis@entrata.com> wrote:
There is nothing native to compute this. This was asked a month or so ago. The best the poster came up with was a regular query on master DB which updates a timestamptz field. Assuming master and slave have clocks in sync, it is simple to compute the lag from that.