Re: Killing a session - Mailing list pgsql-general

From Gregory S. Williamson
Subject Re: Killing a session
Date
Msg-id 71E37EF6B7DCC1499CEA0316A256832801057E6F@loki.wc.globexplorer.net
Whole thread Raw
In response to Killing a session  (Vitaly Belman <vitalyb@gmail.com>)
List 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_queryshows at least a portion of the SQL the thread is executing, and procpid if the pid of the process to kill
witha -15 command. 

Not sure about Windows variants, though.

HTH

Greg Williamson
DBA
GlobeXplorer LLC

-----Original Message-----
From:    Vitaly Belman [mailto:vitalyb@gmail.com]
Sent:    Sat 8/21/2004 1:32 PM
To:    pgsql-general@postgresql.org
Cc:
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@hotmail.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@postgresql.org)




pgsql-general by date:

Previous
From: Daniel Martini
Date:
Subject: Re: libpq: passwords WAS: scripting & psql issues
Next
From: Tom Lane
Date:
Subject: Re: Killing a session