X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 27689D1CC84 for ; Thu, 29 Jan 2004 22:37:47 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 53309-03 for ; Thu, 29 Jan 2004 18:37:17 -0400 (AST) Received: from mta02.ono.com (unknown [62.42.230.12]) by svr1.postgresql.org (Postfix) with ESMTP id 0991ED1B4EF for ; Thu, 29 Jan 2004 18:37:15 -0400 (AST) Received: from ono.com (81.203.9.54) by mta02.ono.com (7.0.024) id 3FFD7CD4000AC773; Thu, 29 Jan 2004 23:36:11 +0100 Message-ID: <40198AE2.5000808@ono.com> Date: Thu, 29 Jan 2004 23:36:18 +0100 From: Juan Miguel User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: es-es, en-us, en MIME-Version: 1.0 To: Hadley Willan Cc: "Gregory S. Williamson" , PGSQL Admin Subject: Re: Forcing connections closed References: <71E37EF6B7DCC1499CEA0316A25683280105762A@loki.wc.globexplorer.net> <1075411554.23417.13.camel@atlas.sol.deeper.co.nz> In-Reply-To: <1075411554.23417.13.camel@atlas.sol.deeper.co.nz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/282 X-Sequence-Number: 12145 You can kill the procs (connections) using kill -9 PID For example, ps aux | grep post gives you a list of the postgres processes (all the active connections, and main postmaster). Here you can see the IP of the manchines connected from. Therefore, its easy to create an shell script for killing the connection of a client machine. >Thanks for that, however that's quite heavy handed in that it will stop >the postgres instance. > >Is there any way to close connections to a database without stopping >postgres itself? > >E.G I have three databases, A,B and C, and only want to close C. > >Thanks > >On Fri, 2004-01-30 at 10:21, Gregory S. Williamson wrote: > > > >>pg_ctl stop [-W] [-D DATADIR] [-s] [-m SHUTDOWN-MODE] >> >>e.g. >> >>pg_ctl stop -D /data/postgres/gex_runtime -m fast >> >>will shut down all connections and stop the postgres instance: >>Shutdown modes are: >> smart quit after all clients have disconnected >> fast quit directly, with proper shutdown >> immediate quit without complete shutdown; will lead to recovery on restart >> >>HTH, >> >>Greg Williamson >>DBA >>GlobeXplorer LLC >> >>-----Original Message----- >>From: Hadley Willan [mailto:hadley.willan@deeperdesign.co.nz] >>Sent: Thu 1/29/2004 1:03 PM >>To: PGSQL Admin >>Cc: >>Subject: [ADMIN] Forcing connections closed >> >>Hello, >> How do I force postmaster to terminate active connections on other >>databases? >> >>Thanks >> >> > > >