Re: Killing the backend to cancel a long waiting query - Mailing list pgsql-hackers

From Paulo Scardine
Subject Re: Killing the backend to cancel a long waiting query
Date
Msg-id 05d601c3813c$2296e0c0$6101a8c0@Paulo
Whole thread Raw
In response to Re: Killing the backend to cancel a long waiting query  (Kevin Brown <kevin@sysexperts.com>)
List pgsql-hackers
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?
>



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: PostgreSQL not ACID compliant?
Next
From: Bruce Momjian
Date:
Subject: Back from Mexico