pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paulo Scardine <paulos@cimed.ind.br>
To: Robert Treat <xzilla@users.sourceforge.net>
Cc: Dave Page <dpage@vale-housing.co.uk>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Killing the backend to cancel a long waiting query
Date: Mon, 22 Sep 2003 16:02:57 -0300
Message-ID: <05d601c3813c$2296e0c0$6101a8c0@Paulo> (raw)
References: <20030921054224.GF3845@filer>
	<20030921142434.S61926-100000@houston.familyhealth.com.au>
	<50096.80.177.99.193.1064140018.squirrel@ssl.vale-housing.co.uk>
	<04f301c38132$7804bc30$6101a8c0@Paulo>
	<1064255371.25694.1903.camel@camel>

I do not know how to do that. I learned that I can send a SIGINT to a
backend to cancel a query, but I dont know how to kill just one transaction.
I have only "pg_getpid" and "pg_killpid" as interfaces to system functions
"getpid" and "kill".

BTW, what information can I get about the current running backends on the
internal structures? Or do I have to ask the OS?

Thank you,
--
Paulo Scardine

----- Original Message ----- 
From: "Robert Treat" <xzilla@users.sourceforge.net>
Subject: Re: [HACKERS] Killing the backend to cancel a long waiting query
>
> Yes, but you may need a way to ensure that the query canceled is the
> same one that you really want to cancel. (imagine come connection
> pooling and bad luck mixed together so that the long running query
> actually ends but another query fires up between the time you lookup the
> long running query and the time you issue the kill...). maybe
> transaction id as well as pid for arguments?
>




view thread (11+ messages)

Message-ID: <05d601c3813c$2296e0c0$6101a8c0@Paulo>
Permalink:  ../05d601c3813c$2296e0c0$6101a8c0@Paulo/
Also on:    postgresql.org/message-id/05d601c3813c$2296e0c0$6101a8c0@Paulo

 · 

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: paulos@cimed.ind.br, xzilla@users.sourceforge.net, dpage@vale-housing.co.uk, pgsql-hackers@postgresql.org
  Subject: Re: Killing the backend to cancel a long waiting query
  In-Reply-To: <05d601c3813c$2296e0c0$6101a8c0@Paulo>

* 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