From: paul socha <pawel.socha@gmail.com>
To: Carol Walter <walterc@indiana.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Who's attached to the database?
Date: Thu, 3 Jul 2008 21:55:41 +0200
Message-ID: <5FDC87F1-8C5F-404B-BB63-8EB14CF5984C@gmail.com> (raw)
In-Reply-To: <9CB3C6A7-9E59-4A40-94BB-C2EE4150EC21@indiana.edu>
References: <9CB3C6A7-9E59-4A40-94BB-C2EE4150EC21@indiana.edu>
On 2008-07-03, at 21:45, Carol Walter wrote:
> Hi, Guys,
>
> 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
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
select * from pg_stat_activity where datname='<database2drop>';
--
Pawel Socha
pawel.socha@gmail.com
perl -le 's**02).4^&-%2,).^9%4^!./4(%2^3,!#+7!2%^53%2&**y%& -;^[%"`-
{ a%%s%%$_%ee'
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: pawel.socha@gmail.com, walterc@indiana.edu
Subject: Re: Who's attached to the database?
In-Reply-To: <5FDC87F1-8C5F-404B-BB63-8EB14CF5984C@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox