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 04f301c38132$7804bc30$6101a8c0@Paulo
Whole thread Raw
In response to Re: Killing the backend to cancel a long waiting query  (Kevin Brown <kevin@sysexperts.com>)
Responses Re: Killing the backend to cancel a long waiting query
List pgsql-hackers
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 | select18737 | 15412337 | postgres | template1 | 0:00 | 192.168.1.65  | idle18693 | 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@vale-housing.co.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.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: missing pg_clog files ?
Next
From: Alvaro Herrera
Date:
Subject: Re: missing pg_clog files ?