Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Admin > Re: Who's attac...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 12 Topic 5118 of 5410
Post > Topic >>

Re: Who's attached to the database?

by jeff@[EMAIL PROTECTED] (Jeff Frost) Jul 3, 2008 at 12:55 PM

Carol Walter 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?
Carol, depending on version and options turned on in the 
postgresql.conf, you probably can have a look in the pg_stat_activity 
system view:

SELECT datname, client_addr FROM pg_stat_activity WHERE datname = '<db 
you're trying to drop>';

Otherwise, you can also have a look at the command line on linux servers 
like this:

ps -ef|grep postgres

or

ps aux | grep postgres

depending what ps variant your system includes.

-- 
Jeff Frost, Owner 	<jeff@[EMAIL PROTECTED]
>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954


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




 12 Posts in Topic:
Who's attached to the database?
walterc@[EMAIL PROTECTED]  2008-07-03 15:45:45 
Re: Who's attached to the database?
Kevin.Grittner@[EMAIL PRO  2008-07-03 14:53:57 
Re: Who's attached to the database?
walterc@[EMAIL PROTECTED]  2008-07-03 16:07:23 
Re: Who's attached to the database?
walterc@[EMAIL PROTECTED]  2008-07-03 17:23:50 
Re: Who's attached to the database?
banderson@[EMAIL PROTECTE  2008-07-03 14:17:30 
Re: Who's attached to the database?
lennin.caro@[EMAIL PROTEC  2008-07-04 06:50:43 
Re: Who's attached to the database?
postgresql@[EMAIL PROTECT  2008-07-04 18:41:02 
Re: Who's attached to the database?
tgl@[EMAIL PROTECTED] (T  2008-07-03 15:54:25 
Re: Who's attached to the database?
jeff@[EMAIL PROTECTED] (  2008-07-03 12:55:14 
Re: Who's attached to the database?
pawel.socha@[EMAIL PROTEC  2008-07-03 21:55:41 
Re: Who's attached to the database?
Kevin.Grittner@[EMAIL PRO  2008-07-03 17:04:11 
Re: Who's attached to the database?
lennin.caro@[EMAIL PROTEC  2008-07-04 06:47:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 6:51:15 CDT 2008.