Erik Jones wrote:
These are all client databases at the web hosting company I work at.
I can't go putting triggers on all of their tables. I think I'll
just
start taking snapshots of pertinent data from pg_stat_activity and
after I've been collecting data for a while run a report of dbs that
haven't seen connections in X long since what I'm really after is
inactive databases.
Did you think about just setting log_connections to ON and grep'ing the
server logs?
Otherwise it looks like a use-case for ON CONNECT triggers,
unfortunately we don't have them yet.
The TODO list links that message:
http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php
Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general