Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8CCA6650EA7 for ; Thu, 3 Jul 2008 16:54:47 -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 53921-04 for ; Thu, 3 Jul 2008 16:54:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id ED827650E8F for ; Thu, 3 Jul 2008 16:54:31 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m63JsP9s006658; Thu, 3 Jul 2008 15:54:25 -0400 (EDT) To: Carol Walter cc: pgsql-admin@postgresql.org Subject: Re: Who's attached to the database? In-reply-to: <9CB3C6A7-9E59-4A40-94BB-C2EE4150EC21@indiana.edu> References: <9CB3C6A7-9E59-4A40-94BB-C2EE4150EC21@indiana.edu> Comments: In-reply-to Carol Walter message dated "Thu, 03 Jul 2008 15:45:45 -0400" Date: Thu, 03 Jul 2008 15:54:25 -0400 Message-ID: <6657.1215114865@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/51 X-Sequence-Number: 29661 Carol Walter 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