On Fri, 22 Feb 2008, David Jaquay wrote:
In my case, I've got a connection that's hanging around after my code should have closed it, which means almost certainly that I've got problems in my code, but I'd love to be able to get that "57413" number from my jdbc object and write it to my logs to troubleshoot this. Any ideas?
The JDBC driver has an option logUnclosedConnections[1] that can be used to find where you've neglected to close things. Any connection that gets cleaned up by the garbage collector logs the stacktrace of its creation, so you can see where it got built from.
Kris Jurka [1] http://jdbc.postgresql.org/documentation/83/connect.html#connection-parameters ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match