Skip site navigation (1) Skip section navigation (2)

Re: Who's attached to the database?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:54:25
Message-ID: 6657.1215114865@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Carol Walter <walterc(at)indiana(dot)edu> writes:
> 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?

pg_stat_activity ... or if you turned that off, "ps auxww | grep postgres"
(or local equivalent) might help.

			regards, tom lane

In response to

pgsql-admin by date

Next:From: Jeff FrostDate: 2008-07-03 19:55:14
Subject: Re: Who's attached to the database?
Previous:From: Kevin GrittnerDate: 2008-07-03 19:53:57
Subject: Re: Who's attached to the database?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group