Re: how to measure pglogical replication lag

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: "Guo, Yun" <YGuo(at)cvent(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how to measure pglogical replication lag
Date: 2016-04-26 02:24:05
Message-ID: CAMsr+YFCRJMQJA_KXdgmS2PrER606Mgj8t9m+BmN1Sg8HndbaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26 April 2016 at 03:08, Guo, Yun <YGuo(at)cvent(dot)com> wrote:

> Is there a function or view that could return a measurable replication lag
> of Pglogical ?
>

It's the same as normal streaming replication. Use pg_stat_replication
and/or pg_replication_slots to compare the LSN received by the client to
the current server xlog insert position.

Like streaming replication there's currently no way to find out from the
client side how far behind the client is. I think we should actually change
that by sending an occasional message to the client with the server's
current xlog insert position, though, so the client knows how far behind it
is...

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2016-04-26 02:39:46 Removing faulty hyperLogLog merge function
Previous Message Peter Geoghegan 2016-04-26 02:12:28 Re: Fix for OpenSSL error queue bug