Re: Who's attached to the database?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Carol Walter" <walterc(at)indiana(dot)edu>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: Who's attached to the database?
Date: 2008-07-03 19:53:57
Message-ID: 486CE819.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>>> Carol Walter <walterc(at)indiana(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2008-07-03 19:54:25 Re: Who's attached to the database?
Previous Message Carol Walter 2008-07-03 19:45:45 Who's attached to the database?