Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 7EB839F9B7D for ; Mon, 15 Oct 2007 10:56:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 45318-06 for ; Mon, 15 Oct 2007 10:56:35 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by postgresql.org (Postfix) with ESMTP id 57B4F9F9B13 for ; Mon, 15 Oct 2007 10:56:44 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so80098ana for ; Mon, 15 Oct 2007 06:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=NuZdKbolOJkKkL+YvWX2NIrfFYCrB+5HsEiLDt31YBY=; b=RJhHh1CLlo8yEEDaJw2VUtKerTVB2e7EYInHlTM0MxuuWGds2p3X/NAhL39m5GAUHtdrgVarJ4CyEL7fnk/UPPndXS+WJwMK1vPCCZTZQLY94naTLhiUEtTk0rYuEblIqSgWXzgMHGMcE26Gu8B0XVs4Fgp1LpcTYJ2Ya8OgBg0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=slKykXs9lzo3MqyKltNhnSQKzeo+Q0CffWmmCx0d0tm7JJVBBm1HBnXqMEhUc2C9IVFkHn/bb7i1MYLDWnRU6qWudOaTqXyNRkSdOfPvAXx4WOKEdVMm1f6fGZRuGqznMqhhY67E4X8loD4Qb3nYjueLJ1eLmASeNh3hmVLK5Uc= Received: by 10.142.102.5 with SMTP id z5mr1417869wfb.1192456215813; Mon, 15 Oct 2007 06:50:15 -0700 (PDT) Received: by 10.143.8.5 with HTTP; Mon, 15 Oct 2007 06:50:15 -0700 (PDT) Message-ID: <36e682920710150650i1ba6b1bfm2376f38537220547@mail.gmail.com> Date: Mon, 15 Oct 2007 09:50:15 -0400 From: "Jonah H. Harris" To: "Jessica Richard" Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list? Cc: pgsql-admin@postgresql.org In-Reply-To: <23085.65196.qm@web56403.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <23085.65196.qm@web56403.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/117 X-Sequence-Number: 27031 On 10/15/07, Jessica Richard wrote: > When you see a hanging Postgres connection (or a job running so long and you > don't want to continue any more) from > > select * from pg_stat_activity > > and you want to disconnect it, > > how do you do it? See pg_cancel_backend You should also look at using statement_timeout if this is a regular occurrence. -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com Edison, NJ 08837 | http://www.enterprisedb.com/