473,396 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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: tm******@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 ma*******@postgresql.org)

Nov 23 '05 #1
2 2236
Vitaly Belman <vi*****@gmail.com> writes:
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.


ISTM what you really want is query cancel, not whole-session kill.
Try "kill -INT <pid-of-backend>".

regards, tom lane

---------------------------(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

Nov 23 '05 #2
Even better. Thanks =).

On Sat, 21 Aug 2004 20:14:53 -0400, Tom Lane <tg*@sss.pgh.pa.us> wrote:


Vitaly Belman <vi*****@gmail.com> writes:
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.


ISTM what you really want is query cancel, not whole-session kill.
Try "kill -INT <pid-of-backend>".

regards, tom lane

---------------------------(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

--
ICQ: 1912453
AIM: VitalyB1984
MSN: tm******@hotmail.com
Yahoo!: VitalyBe

---------------------------(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

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Colin Steadman | last post by:
I have created a function to kill all session variables that aren't in a safe list. This is the function - Sub PurgeSessionVariables For Each Item In Session.Contents Select Case Trim(Item)...
2
by: MLH | last post by:
On the subject of switching between virtual consoles to get out of a 'hung' situation in the primary console... What I have been doing is pressing LEFTALT-F4 to bring up a 2nd virtual console,...
14
by: Rob Meade | last post by:
Hi all, Having created a secure login, and then create session variables to detect wether or not a user is logged in - I would now like to be able to off a log out page! :) I have found the...
2
by: news.microsoft.com | last post by:
I am having a difficult time with cookies. In my code, I need to allow a user to login to my admin site. I figure I can set a cookie, then authenticate them, and all should be well. This works,...
3
by: Raghu Raman | last post by:
Hi, am in c#.net project. am using the session object for some logic. e-g:session="Add"; i can refer this by using if(Session=="Add") { logic
12
by: deepak2006it | last post by:
i want to kill a session on page load & then redirect it to another page.
1
by: chaitanya1167 | last post by:
hi everyone, I have created a session and ended it using session.abandon() & redirected to home page. now on clicking IE back button I am able to go to previos page how can I overcome this.
1
by: Yong Feei Shun | last post by:
Dear all, I am having a question here. hope you guys could help. Whenever i kill a user, i cant kill the oracle statement there, eventhough the user had been killed. What should be the problem?...
3
by: eeriehunk | last post by:
Hi All, I am a little confused between a session and a process. I learnt that an Oracle Session is created for every login. And we can run many processes in one session. I have also learnt how to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.