Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DF8589FB4B9 for ; Fri, 26 Oct 2007 19:23:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 44392-01-3 for ; Fri, 26 Oct 2007 19:23:10 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id D94799FCAE3 for ; Fri, 26 Oct 2007 19:23:08 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IlXa1-00082C-9K for pgsql-admin@postgresql.org; Fri, 26 Oct 2007 22:23:01 +0000 Received: from 77.70.61.39 ([77.70.61.39]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Oct 2007 22:23:01 +0000 Received: from milen by 77.70.61.39 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Oct 2007 22:23:01 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: "Milen A. Radev" Subject: Re: Find the Person Connected to a Database Date: Sat, 27 Oct 2007 01:22:53 +0300 Lines: 14 Message-ID: References: <26960.1193434395@sss.pgh.pa.us> <20071026144005.3aa6cc29@scratch> <27413.1193435100@sss.pgh.pa.us> <472262A5.2020605@mhs.mphasis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 77.70.61.39 User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <472262A5.2020605@mhs.mphasis.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.375 tagged_above=0 required=5 tests=AWL=-0.582, BAYES_05=-1.11, RCVD_NUMERIC_HELO=2.067 X-Spam-Level: X-Archive-Number: 200710/272 X-Sequence-Number: 27186 Naomi Walker написа: > I'm trying to drop a database in a postgres 8.1.4 instance (x86 Solaris > 10 OS), but someone is connected to > the database. What is the best way to find out exactly who is connected? > select * from pg_stat_activity where datname = ; More here - http://www.postgresql.org/docs/8.1/static/monitoring-stats.html#MONITORING-STATS-VIEWS. -- Milen A. Radev