X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3BBE5D1B7D5 for ; Wed, 16 Jun 2004 16:39:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47142-02 for ; Wed, 16 Jun 2004 19:39:37 +0000 (GMT) Received: from web12704.mail.yahoo.com (web12704.mail.yahoo.com [216.136.173.241]) by svr1.postgresql.org (Postfix) with SMTP id C9644D1B1B4 for ; Wed, 16 Jun 2004 16:39:05 -0300 (ADT) Message-ID: <20040616193851.95910.qmail@web12704.mail.yahoo.com> Received: from [211.95.204.100] by web12704.mail.yahoo.com via HTTP; Wed, 16 Jun 2004 12:38:51 PDT Date: Wed, 16 Jun 2004 12:38:51 -0700 (PDT) From: Subject: Listing all open sessions/connections/XAs ? To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.4 tagged_above=0.0 required=5.0 tests=NO_REAL_NAME, RCVD_IN_RFCI X-Spam-Level: X-Archive-Number: 200406/209 X-Sequence-Number: 13869 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