From: Lennin Caro <lennin.caro@yahoo.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Carol Walter <walterc@indiana.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Who's attached to the database?
Date: Fri, 4 Jul 2008 06:50:43 -0700 (PDT)
Message-ID: <902696.39596.qm@web59510.mail.ac4.yahoo.com> (raw)
In-Reply-To: <DCE58E12-256E-4707-A8E8-3B33FB286D09@indiana.edu>
try this
select pg_cancel_backend(<processid_db>);
if the command not work kill the process in os
kill -9 proccessid_os
--- On Thu, 7/3/08, Carol Walter <walterc@indiana.edu> wrote:
> From: Carol Walter <walterc@indiana.edu>
> Subject: Re: [ADMIN] Who's attached to the database?
> To: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
> Cc: pgsql-admin@postgresql.org
> Date: Thursday, July 3, 2008, 8:07 PM
> Thanks, guys,
>
> This told me that the user that has it open is the
> interface user
> called db_user. Is there a command to disconnect this
> user?
>
> Carol
>
> On Jul 3, 2008, at 3:53 PM, Kevin Grittner wrote:
>
> >>>> Carol Walter <walterc@indiana.edu>
> 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
>
>
> --
> Sent via pgsql-admin mailing list
> (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
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: lennin.caro@yahoo.com, Kevin.Grittner@wicourts.gov, walterc@indiana.edu
Subject: Re: Who's attached to the database?
In-Reply-To: <902696.39596.qm@web59510.mail.ac4.yahoo.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