X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id B7A55D1BADD for ; Mon, 22 Sep 2003 17:55:46 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 73130-03 for ; Mon, 22 Sep 2003 14:55:16 -0300 (ADT) Received: from angelica (unknown [200.161.129.200]) by svr1.postgresql.org (Postfix) with ESMTP id 71A77D1CA62 for ; Mon, 22 Sep 2003 14:55:14 -0300 (ADT) Received: from [192.168.1.97] (helo=Paulo) by angelica with smtp (Exim 3.36 #1 (Debian)) id 1A1VAq-0004Kj-00; Mon, 22 Sep 2003 15:12:36 -0300 Message-ID: <04f301c38132$7804bc30$6101a8c0@Paulo> From: "Paulo Scardine" To: "Dave Page" Cc: References: <20030921054224.GF3845@filer> <20030921142434.S61926-100000@houston.familyhealth.com.au> <50096.80.177.99.193.1064140018.squirrel@ssl.vale-housing.co.uk> Subject: Re: Killing the backend to cancel a long waiting query Date: Mon, 22 Sep 2003 14:53:45 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/1118 X-Sequence-Number: 44130 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" > > 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.