Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 952889FBE11; Wed, 25 Apr 2007 11:57:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 97209-01; Wed, 25 Apr 2007 11:56:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from community1.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id EF73E9FBE18; Wed, 25 Apr 2007 11:56:54 -0300 (ADT) Received: from [192.168.27.150] (unknown [12.38.10.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by community1.commandprompt.com (Postfix) with ESMTP id 074B1246DC1; Wed, 25 Apr 2007 07:56:52 -0700 (PDT) Message-ID: <462F6C33.3070705@dunslane.net> Date: Wed, 25 Apr 2007 10:56:51 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.9) Gecko/20070102 Fedora/1.0.7-0.5.fc5 SeaMonkey/1.0.7 MIME-Version: 1.0 To: Mageshwaran CC: pgsql-general@postgresql.org, pgsql-admin@postgresql.org, Postgres Subject: Re: [HACKERS] Kill a Long Running Query References: <462F66C1.4030303@sifycorp.com> In-Reply-To: <462F66C1.4030303@sifycorp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/229 X-Sequence-Number: 25293 Mageshwaran wrote: > Hi , > Any body tell me how to kill a long running query in postgresql, is > there any statement to kill a query, and also tell me how to log slow > queries to a log file. > First. please do not cross-post like this. Pick the correct list and use it. Second, this query definitely does not belong on the -hackers list. Third, please find a way of posting to lists that does not include a huge disclaimer and advertisements. If that is added by your company's mail server, you should look at using some other method of posting such as gmail. Fourth, please read our excellent documentation. It contains the answers to your questions, I believe. cheers andrew