Re: canceling query

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: canceling query
Date: 2004-04-19 14:57:21
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB34101ADC5@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

Magnus Hagander wrote:
> This is because there is no Ctrl-C handler in psql on win32. There was
a
> patch for this which was "almost complete", but it was not fully
> thread-safe. The window of error is very small, but it's there.
Perhaps
> we can live with that since it's a client (if you hit the very small
> window, you'll get a segfault or similar). If so, that patch acn
> probably still be applied.

Ok, that makes sense.

> It should die once it tries to send data down the TCP connection,
> though. Since the other end of the socket is gone. Do you know if your
> query gets that for, or is it still executing?

Still executing. CPU load high, and pg_stat_activity reports that
particular query running on that particular backend.

> There really should be no need to bring down the entire postmaster.

Yes...Isn't it possible to set up your app so that it can't be brought
down by the task manager? (IIRC this may only be possible with
services) Of course, this is not a good idea until there is a proper
cancel.

My personal design philosophy is to try and keep normal query execution
time < 1 sec, so I'm not overly concerned about this. I'm just beating
on the postmaster to see what can come up with.

Merlin

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Magnus Hagander 2004-04-19 14:58:16 Re: canceling query
Previous Message Magnus Hagander 2004-04-19 14:33:23 Re: canceling query