Listing all open sessions/connections/XAs ?

From: <ogjunk-pgjedan(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Listing all open sessions/connections/XAs ?
Date: 2004-06-16 19:38:51
Message-ID: 20040616193851.95910.qmail@web12704.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

Occasionally I see that my (web) app leaves some DB connections open,
so they look like this to `ps':

postgres: username dbname 127.0.0.1 idle in transaction

This results in my DB connection pool getting exhausted every so often.
I need to track the source of this problem.

Is there a way to see the SQL (or any other information) associated
with a connection/session/transaction that caused my DB connection to
remain open?

I know MS SQL Server has something like that, and so does Oracle, but I
haven't seen this mentioned in the PostgreSQL Admin Guide.

I have PG 7.3.4.

Thanks,
Otis

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jochen Wiedmann 2004-06-16 20:16:10 PGRES_FATAL_ERROR: out of free buffers: time to abort!
Previous Message Jeff Keller 2004-06-16 18:22:20 Capacity Planning