pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Paulo Scardine <paulos@cimed.ind.br>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-odbc@postgresql.org
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [HACKERS] Killing the backend to cancel a long waiting query
Date: Fri, 19 Sep 2003 08:46:13 +0900
Message-ID: <3F6A43C5.27871514@tpf.co.jp> (raw)
References: <Pine.LNX.4.33.0309161858470.30978-100000@leary.csoft.net>
	<2054.1063808792@sss.pgh.pa.us>
	<3F69A6DE.1050002@bigfoot.com>
	<007701c37e0f$4fc1b550$6101a8c0@Paulo>

Paulo Scardine wrote:
> 
> There are many interfaces that doesn't support canceling a long query other
> than killing the application or killing the backend using the server
> operational system.
> 
> I've searched the docs, faqs and list archives; seen a lot of questions but
> no answers.
> 
> 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.
> 
> Questions are:
> 1) is there a better way to do that?

Call SQLCancel().

regards,
Hiroshi Inoue
	http://www.geocities.jp/inocchichichi/psqlodbc/



view thread (11+ messages)  latest in thread

Message-ID: <3F6A43C5.27871514@tpf.co.jp>
Permalink:  ../3F6A43C5.27871514@tpf.co.jp/
Also on:    postgresql.org/message-id/3F6A43C5.27871514@tpf.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: Inoue@tpf.co.jp, paulos@cimed.ind.br, pgsql-hackers@postgresql.org, pgsql-odbc@postgresql.org
  Subject: Re: [HACKERS] Killing the backend to cancel a long waiting query
  In-Reply-To: <3F6A43C5.27871514@tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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