Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 534E2650E87 for ; Thu, 3 Jul 2008 16:54:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53710-03 for ; Thu, 3 Jul 2008 16:54:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id DFAFE64FD64 for ; Thu, 3 Jul 2008 16:54:13 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Thu, 03 Jul 2008 14:54:12 -0500 Message-Id: <486CE819.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.3 Date: Thu, 03 Jul 2008 14:53:57 -0500 From: "Kevin Grittner" To: "Carol Walter" , Subject: Re: Who's attached to the database? References: <9CB3C6A7-9E59-4A40-94BB-C2EE4150EC21@indiana.edu> In-Reply-To: <9CB3C6A7-9E59-4A40-94BB-C2EE4150EC21@indiana.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/50 X-Sequence-Number: 29660 >>> 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? select * from pg_stat_activity where datname = 'yourdb'; -Kevin