Re: Measurin the lag between a master and a replica

Поиск
Список
Период
Сортировка
От David Kerr
Тема Re: Measurin the lag between a master and a replica
Дата
Msg-id 68AF7114-F8F0-44EC-8C86-80F08DEE5D78@mr-paradox.net
обсуждение исходный текст
Ответ на Re: Measurin the lag between a master and a replica  (Sergey Konoplev <sergey.konoplev@postgresql-consulting.com>)
Список pgsql-admin
On Jul 19, 2012, at 9:03 PM, Sergey Konoplev wrote:

> On Fri, Jul 20, 2012 at 1:02 AM, David Kerr <dmk@mr-paradox.net> 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!



В списке pgsql-admin по дате отправления:

Предыдущее
От: Sergey Konoplev
Дата:
Сообщение: Re: Measurin the lag between a master and a replica
Следующее
От: Sergey Konoplev
Дата:
Сообщение: Re: ERROR: there is no parameter $1