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 0D8A9D1D202 for ; Thu, 29 Jan 2004 21:26:31 +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 26843-02 for ; Thu, 29 Jan 2004 17:26:01 -0400 (AST) Received: from gaia.sol.deeper.co.nz (ns1.sol.deeper.co.nz [219.88.66.128]) by svr1.postgresql.org (Postfix) with ESMTP id CCA7FD1CCB9 for ; Thu, 29 Jan 2004 17:25:57 -0400 (AST) Received: from atlas.sol.deeper.co.nz (atlas.sol.deeper.co.nz [192.168.0.127]) by gaia.sol.deeper.co.nz (8.11.6/8.11.6) with ESMTP id i0TLPsH12461; Fri, 30 Jan 2004 10:25:56 +1300 Subject: Re: Forcing connections closed From: Hadley Willan To: "Gregory S. Williamson" Cc: PGSQL Admin In-Reply-To: <71E37EF6B7DCC1499CEA0316A25683280105762A@loki.wc.globexplorer.net> References: <71E37EF6B7DCC1499CEA0316A25683280105762A@loki.wc.globexplorer.net> Content-Type: multipart/alternative; boundary="=-Yuj86J/B9NESjMIsHzbC" Message-Id: <1075411554.23417.13.camel@atlas.sol.deeper.co.nz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Fri, 30 Jan 2004 10:25:54 +1300 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/280 X-Sequence-Number: 12143 --=-Yuj86J/B9NESjMIsHzbC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 -- Hadley Willan » Director » hadley.willan@deeperdesign.com » +64(21) 28 41 463 Deeper Design Limited » +64(7) 377 3328 » www.deeperdesign.com --=-Yuj86J/B9NESjMIsHzbC Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit 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
--
Hadley Willan » Director » hadley.willan@deeperdesign.com » +64(21) 28 41 463
Deeper Design Limited » +64(7) 377 3328 » www.deeperdesign.com
--=-Yuj86J/B9NESjMIsHzbC--