Skip site navigation (1) Skip section navigation (2)

Re: how do i kill user sessions?

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: "Ing(dot) Jhon Carrillo" <jdigital(at)cantv(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: how do i kill user sessions?
Date: 2005-05-11 20:26:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Wed, 2005-05-11 at 15:08, Ing. Jhon Carrillo wrote:
> I have a problem  with the users administration. When I want to erase
> (drop) some databases there's an error: ** database "name_db" is being
> accessed by other users.**  I want to kill the user sessions conected
> but i don't know how to do it   (Kill the user sessions).

First, use ps to find the pid of the offending users.  for instance:

ps ax|grep postgres|grep test
18925 pts/1    S      0:00 postgres: postgres test [local] idle

then, as the postgres superuser, kill the backend:

kill 18925

In response to


pgsql-admin by date

Next:From: Ing. Jhon CarrilloDate: 2005-05-11 20:30:56
Subject: pgadmin
Previous:From: Ing. Jhon CarrilloDate: 2005-05-11 20:18:04
Subject: Change auto-commit?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group