Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A9529632C56 for ; Mon, 19 Apr 2010 22:25:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 30418-06 for ; Tue, 20 Apr 2010 01:25:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f201.google.com (mail-qy0-f201.google.com [209.85.221.201]) by mail.postgresql.org (Postfix) with ESMTP id 38A05632982 for ; Mon, 19 Apr 2010 22:25:05 -0300 (ADT) Received: by qyk39 with SMTP id 39so1614567qyk.10 for ; Mon, 19 Apr 2010 18:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type; bh=od2Kxm0xtkjbu4/42PObpxcGdeRGdD63QP3R8ZeNtTI=; b=RkGXZ0thvOjxbv3LNBk4RkrVLp6wD1eSGtk5j9FMOWRnEg+lZ5IIva5Ihmu3Id1YD2 4a/TomRKWtxXXpnUMCjEfY30YQZdFnNmgxC3LiVUFdxmd7DxGA746s4mGeOPPWgjhM+Y aeZOiYi3flPfrV/w5cBrhhsWTrFWX5U+5T72A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=ryg4Wxwn04sCq2n5zprN54uM1cWqosxOWpx+7gWsnNhL97CUwusQX0/0+wzowKMioY YC33rAJarpDMl1pjw3ORycjHZ7C6StYawWSwXSetrWlwk0fkyLY3rcAl+6V3c0+tPfMi 9JFwcPoX3XeZiU2GmU/4PJxwH0FQAqtrhzeRU= MIME-Version: 1.0 Received: by 10.229.88.3 with HTTP; Mon, 19 Apr 2010 18:24:40 -0700 (PDT) In-Reply-To: References: <480516.98593.qm@web28311.mail.ukl.yahoo.com> From: Josh Kupershmidt Date: Mon, 19 Apr 2010 21:24:40 -0400 Received: by 10.229.225.72 with SMTP id ir8mr4152337qcb.73.1271726700488; Mon, 19 Apr 2010 18:25:00 -0700 (PDT) Message-ID: Subject: Re: How to disconnect a single user in Postgresql 8.2.5 from a database To: Sergey Konoplev Cc: Steph L , pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201004/264 X-Sequence-Number: 34358 On Mon, Apr 19, 2010 at 11:52 AM, Sergey Konoplev wrote: > On 19 April 2010 15:27, Steph L wrote: >> How to disconnect a single user in Postgresql 8.2.5 from a database ? > AFAIK the only way is to upgrade to 8.4 and use pg_terminate_backend(): > http://www.postgresql.org/docs/8.4/interactive/functions-admin.html pg_terminate_backend() is just a SQL wrapper around: kill -SIGTERM [backend PID] For versions before 8.4: if you can SSH in to the server, run the above on the PID of the backend your user is connected to, and that should terminate their connection. Josh