Re: Monitoring and insight into NOTIFY queue

Поиск
Список
Период
Сортировка
От Matthew Kelly
Тема Re: Monitoring and insight into NOTIFY queue
Дата
Msg-id 1B77A079-857D-46CD-956F-D50257AFFB51@tripadvisor.com
обсуждение исходный текст
Ответ на Re: Monitoring and insight into NOTIFY queue  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general
I just ran into monitoring this and came up with the following 1 liner for monitoring this in releases < 9.6 through
theSQL layer.  Once you are at 9.6 Jeff Janes solution is correct. 

It does make the assumption that the queue size is 8GB.  It can misjudge the queue usage by up to one file segment
size. If you are using this for nagios monitoring, however, that error just disappears as a couple thousandths of a
percentof noise. 

SELECT sum((pg_stat_file('pg_notify/' || pg_ls_dir)).size)/(8 * pow(1024, 3)) * 100 as notify_queue_usage_percent FROM
pg_ls_dir('pg_notify');



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

Предыдущее
От: Ben Buckman
Дата:
Сообщение: Using a VIEW as a temporary mechanism for renaming a table
Следующее
От: Andy Colson
Дата:
Сообщение: Re: Using a VIEW as a temporary mechanism for renaming a table