How to terminate a query

From: A B <gentosaker(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to terminate a query
Date: 2010-04-20 20:42:18
Message-ID: t2xdbbf25901004201342i456463rc5c3864610ab48ee@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi there!

select * from pg_stat_activity;
shows me a
select my_function(....)
query that has been running for too long.
How do I kill it?

kill -9 of the procpid seems to kill the entire server process. So
I'm not really comfortable with that.
The query was started by a webscript that was closed a long time ago.

So how do you stop them? (This is on a Linux box)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2010-04-20 20:53:06 Re: Can the log_statement parameter be set at the user level?
Previous Message Harald Fuchs 2010-04-20 20:25:34 Re: Ltree - how to sort nodes on parent node