From: | Chris Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: how do i kill user sessions? |
Date: | 2005-05-11 22:49:51 |
Message-ID: | 60ekcdtm28.fsf@dba2.int.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
smarlowe(at)g2switchworks(dot)com (Scott Marlowe) writes:
> 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
You may want to be careful about what signal you submit.
If you do "kill -9", for instance, that may be a more severe
"thwacking" of the system than you intended.
Hitting it with "kill -2" is usually the right answer; that's SIGINT.
Other signals may cause the database to kill ALL the backends.
"kill -3", for instance...
"kill -9" will terminate the whole database system, 'with extreme
prejudice,' which will be quite likely to turn out badly :-(.
--
(format nil "~S(at)~S" "cbbrowne" "acm.org")
http://www.ntlug.org/~cbbrowne/sap.html
Rules of the Evil Overlord #78. "I will not tell my Legions of Terror
"And he must be taken alive!" The command will be: ``And try to take
him alive if it is reasonably practical.''"
<http://www.eviloverlord.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-05-12 03:40:45 | Re: thats funny :) |
Previous Message | Chris Browne | 2005-05-11 22:47:13 | Re: [GENERAL] Storing database in WORM devices |