I'm trying to track down leaky connections. (In particular, I'm noticing connections staying open past the closure of the last DataSource, using C3P0 for connection pooling. I suspect a bug but want to ensure I'm not just being stupid first.)
Is there a good way to associate open connections from the Postgres view
postgres=# select * from pg_stat_activity; datid | datname | procpid | usesysid | usename | current_query | waiting | xact_start | query_start | backend_start | client_addr | client_port 11564 | postgres | 95709 | 10 | postgres | select * from pg_stat_activity; | f | 2010-07-25 14:20:24.97529-07 | 2010-07-25 14:20:24.97529-07 | 2010-07-25 14:20:19.066576-07 | | -1 (1 row)
with the location they were opened in the Java / JDBC code? (Or perhaps some unique string, etc) Seems like this ought to be a useful thing to have!