Re: Measurin the lag between a master and a replica

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 19, 2012, at 9:03 PM, Sergey Konoplev wrote:

> On Fri, Jul 20, 2012 at 1:02 AM, David Kerr <dmk@xxxxxxxxxxxxxx> wrote:
>> I was looking into this last month and some nice folks on the list pointed me to this formula
>> for calculating lag. (to be run on the slave) similar to what Sergey said.
>> 
>>        when pg_last_xlog_receive_location() = pg_last_xlog_replay_location()
>>        then 0
>>        else extract ('epoch' from now()-pg_last_xact_replay_timestamp()) end as log_delay;
> 
> If you have a connection problem this will not reflect the situation.


Good caveat! monitor the connection status separately as well!



-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux