Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D05BB9F96BA for ; Mon, 20 Aug 2007 18:22:00 -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 32333-05 for ; Mon, 20 Aug 2007 18:21:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.186]) by postgresql.org (Postfix) with ESMTP id CAC369F96A4 for ; Mon, 20 Aug 2007 18:21:51 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id l15so1021383rvb for ; Mon, 20 Aug 2007 14:21:50 -0700 (PDT) DKIM-Signature: a=rsa-sha1; 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; b=nY00i9KL8FQNXYWt7310ut+v355pZEro/0s0+WlpARqI5YdnMIU7u28dpzuFj0msx5gZoflCYXrG554mZN3syVV3X3/B9PedimcP32/e6x7+tyVthmE++2xdNfMcxfPJrlfwOU2YCBYKO3peRQF62lr0RrixHhb/GFuoEVcvXp4= 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=rNDC9gqYA+wlldSnBiAPY9fczuKmiGWw4lottZk5RbgdshMGwnRXktkkwdBTXAXKUFJhHJwJb+87wG+xG/j45A/pz8BSnNI/0ATk8ehjEODxlSCTmgrTicvpokQemSk2eyClWU2LjtDZfdvoADVu1NBMxoKagybx+6KqNPEuntI= Received: by 10.141.203.12 with SMTP id f12mr3001444rvq.1187644909608; Mon, 20 Aug 2007 14:21:49 -0700 (PDT) Received: by 10.141.98.12 with HTTP; Mon, 20 Aug 2007 14:21:49 -0700 (PDT) Message-ID: Date: Mon, 20 Aug 2007 16:21:49 -0500 From: "Scott Marlowe" To: "Jessica Richard" Subject: Re: how to kill a Postgres connection on the list of select * from pg_stat_activity? Cc: pgsql-admin@postgresql.org In-Reply-To: <518395.14065.qm@web56414.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <518395.14065.qm@web56414.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/234 X-Sequence-Number: 26565 On 8/20/07, Jessica Richard wrote: > Sometime a script talking to the Postgres has already been killed on the OS > level, but the Postgres for this script is still listed out of select * from > pg_stat_activity, saying a particular database is still being accessed by > this script. > > How to kill (release) this connection in this case? > see http://www.postgresql.org/docs/8.2/static/functions-admin.html sepcifically pg_cancel_backend(pid)