X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 642CDD8E32 for ; Wed, 9 Nov 2005 02:24:35 -0400 (AST) 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 75668-06 for ; Wed, 9 Nov 2005 06:24:33 +0000 (GMT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.200]) by svr1.postgresql.org (Postfix) with ESMTP id 790D0D8E2A for ; Wed, 9 Nov 2005 02:24:31 -0400 (AST) Received: by xproxy.gmail.com with SMTP id s15so97085wxc for ; Tue, 08 Nov 2005 22:24:31 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=hEB62JMGdszZz2Nzw7CFJPQCgESNdFuMuEEXFMidOzUblUITbvDzDktNIW/PMmuKPd0YibM8lTpTX32v6oaSJRAA34xTYzZrTdw1I9ZhximfLG3hDfvP+wUn0CwhjaN/AIFyBcyGDuX8lzoDMe5rglfCILkoUvnKY+IVjb78V9k= Received: by 10.65.253.5 with SMTP id f5mr408121qbs; Tue, 08 Nov 2005 22:24:31 -0800 (PST) Received: by 10.64.195.4 with HTTP; Tue, 8 Nov 2005 22:24:31 -0800 (PST) Message-ID: <9e4684ce0511082224i52cdc6b8te0de74f779dd2968@mail.gmail.com> Date: Wed, 9 Nov 2005 07:24:31 +0100 From: hubert depesz lubaczewski To: Andrew Watters Subject: Re: Open connections details Cc: pgsql-admin@postgresql.org In-Reply-To: <43708D73.3070708@gocontent.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11979_5055621.1131517471669" References: <43708D73.3070708@gocontent.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.333 required=5 tests=[AWL=0.000, HTML_MESSAGE=0.001, RCVD_IN_BL_SPAMCOP_NET=1.332] X-Spam-Score: 1.333 X-Spam-Level: * X-Archive-Number: 200511/83 X-Sequence-Number: 19456 ------=_Part_11979_5055621.1131517471669 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 11/8/05, Andrew Watters 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 ------=_Part_11979_5055621.1131517471669 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 11/8/05, Andrew Watters <andrew@gocontent.com> wrote:
I am trying to find details about open connections. I can see that thereare 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
------=_Part_11979_5055621.1131517471669--