Re: Killing the backend to cancel a long waiting query

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Paulo Scardine" <paulos(at)cimed(dot)ind(dot)br>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Killing the backend to cancel a long waiting query
Date: 2003-09-18 18:18:24
Message-ID: 303E00EBDD07B943924382E153890E5434A9DA@cuthbert.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Paulo Scardine [mailto:paulos(at)cimed(dot)ind(dot)br] wrote:
<snip>
So I hacked a small pggetpid and pgkillpid C functions, and now I can
learn
the backend's PID, start the query in a new thread, and kill the backend
using another connection if I want. Its ugly, I know, but worked
wonderfully
with ODBC, the Delphi developers here and the users are very happy.
</snip>

If you are using Delphi, and you are also using Postgres, you should
consider using the Zeos (http://www.zeoslib.net) database component
library for Delphi instead of ODBC. You will generally get better
performance plus Zeos accesses pg directly though the libpq interface
(so you can send request cancel, do asynch. queries, etc.). Also, if
you ever end up making the move to linux application development
(kylix), your life will be much easier.

Regards,
Merlin

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-18 18:25:39 Re: ECPG interface: 7.4beta3 compile failure; CVS tip compile failure
Previous Message Tom Lane 2003-09-18 18:09:19 Re: authentication packet