Thursday, July 3, 2008

Re: [ADMIN] Who's attached to the database?

>>> Carol Walter <walterc@indiana.edu> wrote:
> 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?

select * from pg_stat_activity where datname = 'yourdb';

-Kevin

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

No comments: