Skip site navigation (1) Skip section navigation (2)

Re: Killing a session

From: "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>
To: "Vitaly Belman" <vitalyb(at)gmail(dot)com>,<pgsql-general(at)postgresql(dot)org>
Subject: Re: Killing a session
Date: 2004-08-21 20:45:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
kill -15 pid#

will kill a given thread ... you can look in the pg_stat_activity; the query_start shows when it started, the current_query shows at least a portion of the SQL the thread is executing, and procpid if the pid of the process to kill with a -15 command.

Not sure about Windows variants, though.


Greg Williamson
GlobeXplorer LLC

-----Original Message-----
From:	Vitaly Belman [mailto:vitalyb(at)gmail(dot)com]
Sent:	Sat 8/21/2004 1:32 PM
To:	pgsql-general(at)postgresql(dot)org
Subject:	[GENERAL] Killing a session
Is there a way to kill a session in PostrgeSQL? I ran a bad query by
mistake and I don't want to shut the whole database just to quit using
the whole CPU.

 ICQ: 1912453
 AIM: VitalyB1984
 MSN: tmdagent(at)hotmail(dot)com
 Yahoo!: VitalyBe

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

pgsql-general by date

Next:From: Tom LaneDate: 2004-08-22 00:14:53
Subject: Re: Killing a session
Previous:From: Vitaly BelmanDate: 2004-08-21 20:32:45
Subject: Killing a session

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group