pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Killing a Query
4+ messages / 3 participants
[nested] [flat]

* Killing a Query
@ 2005-05-13 18:31 Brandon Hines <brandon@2i.com>
  2005-05-13 19:34 ` Re: Killing a Query Vikram <vvikram@stanford.edu>
  2005-05-13 20:29 ` Re: Killing a Query Brandon Hines <brandon@2i.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Brandon Hines @ 2005-05-13 18:31 UTC (permalink / raw)
  To: pgsql-admin


Is there a method for killing a query from the server.

I have a number of users that manage to run queries that busy the server 
preventing a number of critical queries from running within an 
acceptable time limit.

I would like to kill off the queries that appear to be busying the 
server without having to take postgres down altogether.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Killing a Query
  2005-05-13 18:31 Killing a Query Brandon Hines <brandon@2i.com>
@ 2005-05-13 19:34 ` Vikram <vvikram@stanford.edu>
  1 sibling, 0 replies; 4+ messages in thread

From: Vikram @ 2005-05-13 19:34 UTC (permalink / raw)
  To: Brandon Hines <brandon@2i.com>; +Cc: pgsql-admin


if i remember correctly, kill -TERM <the procpid of the query> should do
it. you can get the pid of the query process by looking at pg_queries
table

			Vikram

ps: be careful you dont kill -9 or some such.....


On Fri, 13 May 2005, Brandon Hines wrote:

>
> Is there a method for killing a query from the server.
>
> I have a number of users that manage to run queries that busy the server
> preventing a number of critical queries from running within an
> acceptable time limit.
>
> I would like to kill off the queries that appear to be busying the
> server without having to take postgres down altogether.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Killing a Query
  2005-05-13 18:31 Killing a Query Brandon Hines <brandon@2i.com>
@ 2005-05-13 20:29 ` Brandon Hines <brandon@2i.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Brandon Hines @ 2005-05-13 20:29 UTC (permalink / raw)
  To: Brandon Hines <brandon@2i.com>; +Cc: pgsql-admin

Brandon Hines wrote:
> 
> Is there a method for killing a query from the server.
> 
> I have a number of users that manage to run queries that busy the server 
> preventing a number of critical queries from running within an 
> acceptable time limit.
> 
> I would like to kill off the queries that appear to be busying the 
> server without having to take postgres down altogether.
> 


I guess I should have read today's messages before posting.

Thanks, Anjan, for answering my question before I could ask it.

Kill -s SIGINT <pid of offending statement>



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Killing a Query
@ 2005-05-13 19:01 Anjan Dave <adave@vantage.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Anjan Dave @ 2005-05-13 19:01 UTC (permalink / raw)
  To: Brandon Hines <brandon@2i.com>; pgsql-admin

I use kill -s SIGINT <pid of bad query>

Thanks,
Anjan

-----Original Message-----
From: Brandon Hines [mailto:brandon@2i.com] 
Sent: Friday, May 13, 2005 2:32 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Killing a Query


Is there a method for killing a query from the server.

I have a number of users that manage to run queries that busy the server

preventing a number of critical queries from running within an 
acceptable time limit.

I would like to kill off the queries that appear to be busying the 
server without having to take postgres down altogether.



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-05-13 20:29 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-13 18:31 Killing a Query Brandon Hines <brandon@2i.com>
2005-05-13 19:34 ` Vikram <vvikram@stanford.edu>
2005-05-13 20:29 ` Brandon Hines <brandon@2i.com>
2005-05-13 19:01 Re: Killing a Query Anjan Dave <adave@vantage.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox