Skip site navigation (1) Skip section navigation (2)

Re: Find the Person Connected to a Database

From: "Milen A(dot) Radev" <milen(at)radev(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Find the Person Connected to a Database
Date: 2007-10-26 22:22:53
Message-ID: fftpbr$pi5$1@ger.gmane.org (view raw or flat)
Thread:
Lists: pgsql-admin
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


In response to

Responses

pgsql-admin by date

Next:From: Naomi WalkerDate: 2007-10-26 22:25:17
Subject: Find who is connected to a database
Previous:From: Naomi WalkerDate: 2007-10-26 21:56:53
Subject: Find the Person Connected to a Database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group