From: | Andrew Rawnsley <ronz(at)ravensfield(dot)com> |
---|---|
To: | Juan Miguel <juanmime(at)ono(dot)com> |
Cc: | "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>, Hadley Willan <hadley(dot)willan(at)deeperdesign(dot)co(dot)nz>, PGSQL Admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Forcing connections closed |
Date: | 2004-01-30 02:19:23 |
Message-ID: | B8491520-52CA-11D8-87A8-000393A47FCC@ravensfield.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
You can also get pid information from the system view pg_stat_activity,
which also tells you who your killing and what database they're
connected to.
On Jan 29, 2004, at 5:36 PM, Juan Miguel wrote:
> 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(dot)willan(at)deeperdesign(dot)co(dot)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
>>>
>>
>>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if
> your
> joining column's datatypes do not match
>
--------------------
Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-01-30 03:50:30 | Re: commit after dead lock |
Previous Message | Stephan Szabo | 2004-01-30 01:11:07 | Re: commit after dead lock |