Re: Who's attached to the database?

From: Lennin Caro <lennin(dot)caro(at)yahoo(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Carol Walter <walterc(at)indiana(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Who's attached to the database?
Date: 2008-07-04 13:50:43
Message-ID: 902696.39596.qm@web59510.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)indiana(dot)edu> wrote:

> From: Carol Walter <walterc(at)indiana(dot)edu>
> Subject: Re: [ADMIN] Who's attached to the database?
> To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
> Cc: pgsql-admin(at)postgresql(dot)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(at)indiana(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jessica Richard 2008-07-04 13:57:20 how to get fy info from the parent table
Previous Message Lennin Caro 2008-07-04 13:47:23 Re: Who's attached to the database?