Re: Who's attached to the database? - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: Who's attached to the database?
Date
Msg-id 486CE819.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Who's attached to the database?  (Carol Walter <walterc@indiana.edu>)
Responses Re: Who's attached to the database?  (Carol Walter <walterc@indiana.edu>)
List pgsql-admin
>>> 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

pgsql-admin by date:

Previous
From: Carol Walter
Date:
Subject: Who's attached to the database?
Next
From: Tom Lane
Date:
Subject: Re: Who's attached to the database?