From: hubert depesz lubaczewski <depesz@gmail.com>
To: Andrew Watters <andrew@gocontent.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Open connections details
Date: Wed, 9 Nov 2005 07:24:31 +0100
Message-ID: <9e4684ce0511082224i52cdc6b8te0de74f779dd2968@mail.gmail.com> (raw)
In-Reply-To: <43708D73.3070708@gocontent.com>
References: <43708D73.3070708@gocontent.com>
On 11/8/05, Andrew Watters <andrew@gocontent.com> wrote:
>
> I am trying to find details about open connections. I can see that there
> are open connections through Tools | Server Status in pgAdmin III. How
> can I find what the current and/or last SQL statement was that was run
> in those open connections please?
>
select * from pg_stat_activity;
you might have to turn on stats_command_string in postgresql.conf.
depesz
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: depesz@gmail.com, andrew@gocontent.com
Subject: Re: Open connections details
In-Reply-To: <9e4684ce0511082224i52cdc6b8te0de74f779dd2968@mail.gmail.com>
References: <43708D73.3070708@gocontent.com> <9e4684ce0511082224i52cdc6b8te0de74f779dd2968@mail.gmail.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