Script to check replication

Поиск
Список
Период
Сортировка
От Ashish Chauhan
Тема Script to check replication
Дата
Msg-id 6837D32772C03D42BF09864A2DACFF9B1D3195A0@dcmail02.supportsoft.com
обсуждение исходный текст
Ответы Re: Script to check replication  (Jehan-Guillaume de Rorthais <ioguix@free.fr>)
Список pgsql-general

Hi,

 

We are running Streaming replication with Hot standby in our current production. I do have below script to check replication status and replication lag. Does anyone have script which runs every 15 mins to check replication status and send out email if replication is not running or lagging behind.

 

SELECT pg_last_xlog_receive_location() receive, pg_last_xlog_replay_location() replay, now() - pg_last_xact_replay_timestamp() AS replication_delay, (extract(epoch FROM now()) -   extract(epoch FROM pg_last_xact_replay_timestamp()))::int lag

 

Thanks for your help!

 

Thanks,

Ashish Chauhan

 

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.
Следующее
От: "David Bennett"
Дата:
Сообщение: Re: Does a call to a language handler provide a context/session, and somewhere to keep session data?