pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Milen A. Radev <milen@radev.net>
To: pgsql-admin@postgresql.org
Subject: Re: Find the Person Connected to a Database
Date: Sat, 27 Oct 2007 01:22:53 +0300
Message-ID: <fftpbr$pi5$1@ger.gmane.org> (raw)
In-Reply-To: <472262A5.2020605@mhs.mphasis.com>
References: <E11307EB-94DF-4CDD-A89D-0C88A84F2B99@bju.edu>
	<26960.1193434395@sss.pgh.pa.us>
	<20071026144005.3aa6cc29@scratch>
	<27413.1193435100@sss.pgh.pa.us>
	<472262A5.2020605@mhs.mphasis.com>

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 = <the_db_about_to_be_dropped>;

More here -
http://www.postgresql.org/docs/8.1/static/monitoring-stats.html#MONITORING-STATS-VIEWS.


-- 
Milen A. Radev




view thread (4+ messages)  latest in thread

Message-ID: <fftpbr$pi5$1@ger.gmane.org>
Permalink:  ../fftpbr$pi5$1@ger.gmane.org/
Also on:    postgresql.org/message-id/fftpbr$pi5$1@ger.gmane.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: milen@radev.net
  Subject: Re: Find the Person Connected to a Database
  In-Reply-To: <fftpbr$pi5$1@ger.gmane.org>

* 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