| От | Toby Corkindale |
|---|---|
| Тема | Re: Async replication: how to get an alert on failure |
| Дата | |
| Msg-id | 5019EAD8.9090908@strategicdata.com.au обсуждение исходный текст |
| Ответ на | Async replication: how to get an alert on failure (Edson Richter <edsonrichter@hotmail.com>) |
| Список | pgsql-general |
On 02/08/12 10:04, Edson Richter wrote: > I have few PostgreSQL servers established with replication. > Now, is there any way to receive an e-mail in case of error during > synchronization? > I mean, is there an script (cron?) I can run (maybe every 5 minutes) > that will check if replication is stolen, and send an e-mail in case of > failure? I created a little Perl script that just connects to the master and queries the pg_stat_replication statistics. It notes if (a) the client has disconnected entirely, or (b) if the client's replay position has still not reached the position that the master was in last time we checked. (So if you run the check every five minutes, you'll get a warning if the client is more than five minutes lagged behind the master)
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера