Re: Monitoring Streaming Replication in 9.2

Поиск
Список
Период
Сортировка
От dinesh kumar
Тема Re: Monitoring Streaming Replication in 9.2
Дата
Msg-id CALnrH7qsS_8Bf9P35cqbjitGQDSxvroXttQQpaRMN-dL+GswXw@mail.gmail.com
обсуждение исходный текст
Ответ на Monitoring Streaming Replication in 9.2  (J Adams <pacetownsley@gmail.com>)
Список pgsql-general
Hi,

Here is the blog which has good explanation about this.

If you want to find the lag in seconds, then you need to execute something like below.

SELECT pg_last_xact_replay_timestamp() - now();




On Fri, May 16, 2014 at 9:37 PM, J Adams <pacetownsley@gmail.com> wrote:

Newb question here. I have streaming replication working with 9.2 and I'm using Bucardo's check_postgres.pl to monitor replication. I see that it runs this query on the slave:

SELECT pg_last_xlog_receive_location() AS receive, pg_last_xlog_replay_location() AS replay

That returns hex, which is then converted to a number in the script.

My question is this: what does that number represent? Is it just the log position? If so, how does the log position translate to queries? Does one log position = one query? (I did say this was a newb question.)

How do I determine a meaningful alert threshold for that value? Is there a reliable way to monitor replication lag in seconds? How do other people handle this?


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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Questions about DB capabilities
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Psycopg2 : error message.