Re: Killing the backend to cancel a long waiting query

From: "Paulo Scardine" <paulos(at)cimed(dot)ind(dot)br>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Killing the backend to cancel a long waiting query
Date: 2003-09-22 17:53:45
Message-ID: 04f301c38132$7804bc30$6101a8c0@Paulo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces pgsql-odbc

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 | 0:34 | 192.168.2.212 | select
18737 | 15412337 | postgres | template1 | 0:00 | 192.168.1.65 | idle
18693 | 11448964 | postgres | test | 0:00 | 127.0.0.1 | idle
(3 rows)

Test=# select pg_stopquery_pid(4724);
pg_stopquery_pid
------------------
0

Is it worth?

--
Paulo Scardine

----- Original Message -----
From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
> > It would be awesome for phpPGAdmin as well. eg. Superusers would be
> > able to cancel sql queries that gumby users are running, etc.
>
> I'll second that for pgAdmin. I have times in the past where it would have
> been useful on my own systems as well.
> Regards, Dave.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2003-09-22 18:21:43 Re: missing pg_clog files ?
Previous Message Tom Lane 2003-09-22 16:16:59 Re: missing pg_clog files ?

Browse pgsql-interfaces by date

  From Date Subject
Next Message Robert Treat 2003-09-22 18:29:31 Re: Killing the backend to cancel a long waiting query
Previous Message Michael Meskes 2003-09-22 06:33:46 Re: ECPG and structure declaration

Browse pgsql-odbc by date

  From Date Subject
Next Message Robert Treat 2003-09-22 18:29:31 Re: Killing the backend to cancel a long waiting query
Previous Message Richard Huxton 2003-09-22 14:03:51 Re: Password encryption / SSL / SSH