Re: Who's attached to the database?

From: paul socha <pawel(dot)socha(at)gmail(dot)com>
To: Carol Walter <walterc(at)indiana(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Who's attached to the database?
Date: 2008-07-03 19:55:41
Message-ID: 5FDC87F1-8C5F-404B-BB63-8EB14CF5984C@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On 2008-07-03, at 21:45, Carol Walter wrote:

> Hi, Guys,
>
> I'm trying to drop a database and I'm getting an error that says
> that the database is being accessed by other users. Is there a way
> I can find out who these users are or if there really is a user
> accessing it?
>
> Carol
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin

select * from pg_stat_activity where datname='<database2drop>';

--

Pawel Socha
pawel(dot)socha(at)gmail(dot)com

perl -le 's**02).4^&-%2,).^9%4^!./4(%2^3,!#+7!2%^53%2&**y%& -;^[%"`-
{ a%%s%%$_%ee'

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Carol Walter 2008-07-03 20:07:23 Re: Who's attached to the database?
Previous Message Jeff Frost 2008-07-03 19:55:14 Re: Who's attached to the database?