How to track number of connections and hosts to Postgres cluster

Поиск
Список
Период
Сортировка
От Venkat Balaji
Тема How to track number of connections and hosts to Postgres cluster
Дата
Msg-id CAFrxt0gk66pDOuEjB9oQJ=b1VYAeiiNDgEaFz99RhVxrecWsMg@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to track number of connections and hosts to Postgres cluster  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-performance
Hello Everyone,

I am working on an alert script to track the number of connections with the host IPs to the Postgres cluster.

1. I need all the host IPs making a connection to Postgres Cluster (even for a fraction of second).
2. I would also want to track number of IDLE connections, IDLE IN TRANSACTION connections and length of the connections as well.

I would be making use of pg_stat_activity and also thought of enabling logging the host ips in the db server log files which seems to be expensive for me (in terms of IO and logfile size).

Please let me know you if there are any alternatives.

Thanks
Venkat

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

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: 8.4 optimization regression?
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: How to track number of connections and hosts to Postgres cluster