Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 3C0419FB2AA for ; Fri, 2 Feb 2007 17:59:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 41817-10 for ; Fri, 2 Feb 2007 17:59:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id ED2379F9CCD for ; Fri, 2 Feb 2007 17:59:27 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.dbasetek.com (h-66-134-184-74.chcgilgm.covad.net [66.134.184.74]) by svr4.postgresql.org (Postfix) with ESMTP id B54EA5AF9FB for ; Fri, 2 Feb 2007 21:59:21 +0000 (GMT) Received: from [192.168.1.51] ([192.168.1.51]) by mail.dbasetek.com (8.12.11/8.12.11) with ESMTP id l12Lx84a011716; Fri, 2 Feb 2007 15:59:08 -0600 Message-ID: <45C3B431.4010003@dbasetek.com> Date: Fri, 02 Feb 2007 15:59:13 -0600 From: Robert D Oden Organization: Database Marketing Technologies Inc User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Guido Barosio Cc: Phillip Smith , PgSQL ADMIN Subject: Re: Terminating a query that appears to be hung References: <45BE0CB1.5070308@dbasetek.com> <006601c743fe$31e824c0$79587cca@ITLaptop> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DMT-MailScanner-Information: Please contact the ISP for more information X-DMT-MailScanner: Found to be clean X-DMT-MailScanner-From: roden@dbasetek.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/31 X-Sequence-Number: 24496 Thank you for the response. We are using Linux and I am able to identify the offending . I was not sure if killing the process was an acceptable and safe practice. Thanks again! Robert Guido Barosio wrote: > Hmm, if you are a sysadmin you may want to get the process id for the > query, running something like: > > > Select procpid,current_query > from pg_stat_activity > where datname="dbname"; > > If you are running Linux, you'll get the procpid (pid) for the > offending query and by sending "kill -15 " you are > killing/terminating the query. > > No idea on how to proceed if your platform is Windows. > > Best wishes, > Guido Barosio > > > On 1/29/07, Phillip Smith wrote: >> Can youo be a bit more specific...? What client? >> >> Psql should terminate the connection when it exist. pgAdmin will >> close it >> when you exit the ap, or if you choose 'Disconnect' from the menu. In >> PHP >> you'll need to call pg_close function... Every 'client' will have a >> different method... >> >> -----Original Message----- >> From: pgsql-admin-owner@postgresql.org >> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Robert D Oden >> Sent: Tuesday, 30 January 2007 2:03 AM >> To: PgSQL ADMIN >> Subject: [ADMIN] Terminating a query that appears to be hung >> >> Is there a way to terminate a client session without having to restart >> Postgres. >> >> Thanks >> >> -- >> >> Robert D Oden >> Database Marketing Technologies, Inc >> 951 Locust Hill Circle >> Belton MO 64012-1786 >> >> Ph: 816-318-8840 >> Fax: 816-318-8841 >> >> roden@dbasetek.com >> >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 7: You can help support the PostgreSQL project by donating at >> >> http://www.postgresql.org/about/donate >> >> >> *******************Confidentiality and Privilege >> Notice******************* >> >> The material contained in this message is privileged and confidential to >> the addressee. If you are not the addressee indicated in this >> message or >> responsible for delivery of the message to such person, you may not copy >> or deliver this message to anyone, and you should destroy it and kindly >> notify the sender by reply email. >> >> Information in this message that does not relate to the official >> business >> of Weatherbeeta must be treated as neither given nor endorsed by >> Weatherbeeta. >> Weatherbeeta, its employees, contractors or associates shall not be >> liable >> for direct, indirect or consequential loss arising from transmission >> of this >> message or any attachments >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 2: Don't 'kill -9' the postmaster >> > > -- Robert D Oden Database Marketing Technologies, Inc 951 Locust Hill Circle Belton MO 64012-1786 Ph: 816-318-8840 Fax: 816-318-8841 roden@dbasetek.com