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

Re: Cancelling long running query?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: "Patrick Hatcher" <PHatcher(at)macys(dot)com>,pgsql-novice(at)postgresql(dot)org
Subject: Re: Cancelling long running query?
Date: 2002-11-12 00:58:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> How can I cancel a long running query besides quitting the app?

> Methods:
> 1) Shutdown and restart the database server with pg_ctl -m fast restart.

Better is just to send SIGINT to the individual backend running the
query.  This is equivalent to the client having made a QueryCancel

> 2) Kill the client connection proccess on the server side.  This is dangerous
> if the long-running query is a data-modification query.

No more dangerous than any other forced database crash ... which is what
you will get if you kill a backend process ...

			regards, tom lane

In response to


  • SQL at 2002-11-12 06:45:37 from cristi

pgsql-novice by date

Next:From: Lakshmi Narayanan VDate: 2002-11-12 01:40:04
Subject: Invlalid EUC_JP character
Previous:From: Josh BerkusDate: 2002-11-11 19:58:49
Subject: Re: Cancelling long running query?

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