Re: Understanding ps -ef "command" column

From: Kris Jurka <books(at)ejurka(dot)com>
To: David Jaquay <djaquay(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Understanding ps -ef "command" column
Date: 2008-02-22 21:15:42
Message-ID: Pine.BSO.4.64.0802221612270.4123@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dot Yet 2008-02-22 21:33:04 Re: Unique indicies
Previous Message Andrej Ricnik-Bay 2008-02-22 20:47:51 Re: Understanding ps -ef "command" column