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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-admin by date

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