Re: how to cancel a query in progress - Mailing list pgsql-general

From Whit Armstrong
Subject Re: how to cancel a query in progress
Date
Msg-id 8ec76080906170856w3dfb9be4u6430c808a78e6d14@mail.gmail.com
Whole thread Raw
In response to Re: how to cancel a query in progress  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: how to cancel a query in progress
List pgsql-general
Thanks, Tom.

Lesson learned.

Are there any integrity checks I need to run on the db after this type
of crash and recovery, or is vacuum --all good enough?

-Whit


On Wed, Jun 17, 2009 at 11:19 AM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
> Whit Armstrong <armstrong.whit@gmail.com> writes:
>> I had a few queries that were fired from pgAdmin, but failed to stop
>> running after I killed the GUI.
>
>> I tried to stop the queries by killing the pid (of the process running
>> the query, not the pid of the server) from the linux command line, and
>> much to my surprise, the whole database went down and then recovered
>> (using the data in pg_xlog I assume).
>
> I suppose you used "kill -9"?  Don't do that.
>
>> So, now that I've learned this lesson, what is the proper way to kill
>> a query, and can it be done from psql or are there special postgres
>> tools to do this.
>
> kill -INT is a safe query-cancel method.
>
>                        regards, tom lane
>

pgsql-general by date:

Previous
From: "Mike Kay"
Date:
Subject: Re: used for large media files
Next
From: Tom Lane
Date:
Subject: Re: Playing with set returning functions in SELECT list - behaviour intended?