pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ogjunk-pgjedan@yahoo.com
To: pgsql-admin@postgresql.org
Subject: Listing all open sessions/connections/XAs ?
Date: Wed, 16 Jun 2004 12:38:51 -0700 (PDT)
Message-ID: <20040616193851.95910.qmail@web12704.mail.yahoo.com> (raw)

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




view thread (2+ messages)  latest in thread

Message-ID: <20040616193851.95910.qmail@web12704.mail.yahoo.com>
Permalink:  ../20040616193851.95910.qmail@web12704.mail.yahoo.com/
Also on:    postgresql.org/message-id/20040616193851.95910.qmail@web12704.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: ogjunk-pgjedan@yahoo.com
  Subject: Re: Listing all open sessions/connections/XAs ?
  In-Reply-To: <20040616193851.95910.qmail@web12704.mail.yahoo.com>
  References: <20040616193851.95910.qmail@web12704.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox