Re: Forcing connections closed - Mailing list pgsql-admin

From Ryan Chambers
Subject Re: Forcing connections closed
Date
Msg-id 40197FA6.5040508@squaretrade.com
Whole thread Raw
In response to Re: Forcing connections closed  (Hadley Willan <hadley.willan@deeperdesign.co.nz>)
List pgsql-admin
It's possible to get process ids for clients using something like ps -ef | grep postgres. I wonder, is it safe to use kill to terminate those threads? If this doesn't mess up the database, it might work.

Hadley Willan wrote:
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

pgsql-admin by date:

Previous
From: Hadley Willan
Date:
Subject: Re: Forcing connections closed
Next
From: Juan Miguel
Date:
Subject: Re: Forcing connections closed