X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A3C1C52972 for ; Wed, 11 May 2005 17:26:25 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82190-05 for ; Wed, 11 May 2005 20:26:24 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 216CE52951 for ; Wed, 11 May 2005 17:26:22 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 11 May 2005 15:26:23 -0500 Subject: Re: how do i kill user sessions? From: Scott Marlowe To: "Ing. Jhon Carrillo" Cc: pgsql-admin@postgresql.org In-Reply-To: <00bc01c55665$31117340$1400a8c0@tgusta2> References: <00bc01c55665$31117340$1400a8c0@tgusta2> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1115843183.3868.237.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 11 May 2005 15:26:23 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/126 X-Sequence-Number: 17555 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