Re: Measuring replay lag - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Measuring replay lag
Date
Msg-id CAEepm=0vv_YetnKEheCYULQU6RT3yZonVmeioCr_mad7a=BeYQ@mail.gmail.com
Whole thread Raw
In response to Re: Measuring replay lag  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: [HACKERS] Measuring replay lag  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Tue, Nov 8, 2016 at 2:35 PM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> replay_lag_sample_interval is 1s by default but I got 1000s by SHOW command.
> postgres(1:36789)=# show replay_lag_sample_interval ;
>  replay_lag_sample_interval
> ----------------------------
>  1000s
> (1 row)

Oops, fixed.

>> 1.  The lag is measured in time, not LSN difference.
>> 2.  The lag time is computed using two observations of a single
>> server's clock, so there is no clock skew.
>> 3.  The lag is updated even between commits (during large data loads etc).
>
> I agree with this approach.

Thanks for the feedback.

> I think that you need to change sendFeedback() in pg_recvlogical.c and
> receivexlog.c as well.

Right, fixed.

Thanks very much for testing!  New version attached.  I will add this
to the next CF.

--
Thomas Munro
http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Declarative partitioning - another take
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Fix checkpoint skip logic on idle systems by tracking LSN progress