Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-22 Thread Paulo Scardine
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" <[EMAIL PROTECTED]> Subject: Re: [HACKERS] Killing the backend to cancel a long waiting

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-22 Thread Robert Treat
On Mon, 2003-09-22 at 13:53, Paulo Scardine wrote: > I can implement it as C functions, I think. > Would be nice to have something like: > > Test=# select pg_list_backends(); > pid | conn_id | user | database | time | host | status > ---+--+--+---+

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-22 Thread Paulo Scardine
I can implement it as C functions, I think. Would be nice to have something like: Test=# select pg_list_backends(); pid | conn_id | user | database | time | host | status ---+--+--+---+--+---+ 4724 | 35445134 | marcelo | test

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-21 Thread Dave Page
It's rumoured that Christopher Kings-Lynne once said: >> Wouldn't it be useful, though, to implement a "KILL" or "CANCEL" SQL >> command that takes a backend ID as its argument (and, of course, does >> the appropriate checks of whether you're a superuser or the owner of >> the backend) and sends th

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-20 Thread Christopher Kings-Lynne
> Wouldn't it be useful, though, to implement a "KILL" or "CANCEL" SQL > command that takes a backend ID as its argument (and, of course, does > the appropriate checks of whether you're a superuser or the owner of > the backend) and sends the appropriate signal to the target backend? > > That would

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-20 Thread Kevin Brown
Tom Lane wrote: > "Paulo Scardine" <[EMAIL PROTECTED]> writes: > >> I trust when you say "kill", you really mean "send SIGINT" ... > > > I'm sending a SIGTERM. Would SIGINT be more appropriate? > > Yes --- that would actually cancel the query, not cause the backend to > shut down. Ahh...this is

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-18 Thread Hiroshi Inoue
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 >

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-18 Thread Tom Lane
"Paulo Scardine" <[EMAIL PROTECTED]> writes: >> I trust when you say "kill", you really mean "send SIGINT" ... > I'm sending a SIGTERM. Would SIGINT be more appropriate? Yes --- that would actually cancel the query, not cause the backend to shut down. regards, tom lane -

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-18 Thread Paulo Scardine
- Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> > ... > I trust when you say "kill", you really mean "send SIGINT" ... > ... I'm sending a SIGTERM. Would SIGINT be more appropriate? Thank you, -- Paulo Scardine ---(end of broadcast)

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-18 Thread Tom Lane
"Paulo Scardine" <[EMAIL PROTECTED]> writes: > 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. I trust when you say "kill", you really mean "send SIGINT" ...

Re: [HACKERS] Killing the backend to cancel a long waiting query

2003-09-18 Thread Merlin Moncure
Paulo Scardine [mailto:[EMAIL PROTECTED] wrote: 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 de

[HACKERS] Killing the backend to cancel a long waiting query

2003-09-18 Thread Paulo Scardine
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