Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8671B634F6B for ; Tue, 20 Apr 2010 12:05:40 -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 81318-01-9 for ; Tue, 20 Apr 2010 15:05:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f214.google.com (mail-gx0-f214.google.com [209.85.217.214]) by mail.postgresql.org (Postfix) with ESMTP id CAC36634206 for ; Tue, 20 Apr 2010 11:55:50 -0300 (ADT) Received: by gxk6 with SMTP id 6so113605gxk.14 for ; Tue, 20 Apr 2010 07:55:50 -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 :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=rgzGQ1elsovOLrjo9u2r2fw/P6A5iZBW1S0vGYX32hs=; b=bSJSQ5NsNMvdsMD2B4qbrjqsr5hC68SkgXKr3Z7g+Bu+X+ifc6iR29wAI+N1bCdor9 mGaa4BRm3XPCrjSgCPCliSYHKcnYfx7Opyb4sfzdLFuLhfY8ZGMWIYYREHjf4wFmtlNd 9h35uz4uRAqhnSKwoAoa9TxH80Af8gf+u2K4c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=u9ZcS3UuVJcfGxZDas772UtG4W9WIZ8DI8Dcbx4lnlcdJrnhk3PU1NDA9S6lILMXFd 3W/0YYQ8cGxYxVlsHBycdgmsKWUwfF6c7EoAsDPPWMyTxEhVISWzdlbdzG2WGWISqu6h kEKAGs/zAjMNRWhQTHht0uO5SL7HGt0G4JCQk= MIME-Version: 1.0 Received: by 10.150.218.9 with HTTP; Tue, 20 Apr 2010 07:55:49 -0700 (PDT) In-Reply-To: <4BCDB1B7.1010603@setonhome.org> References: <480516.98593.qm@web28311.mail.ukl.yahoo.com> <15823.1271729409@sss.pgh.pa.us> <4BCDB1B7.1010603@setonhome.org> Date: Tue, 20 Apr 2010 08:55:49 -0600 Received: by 10.150.128.36 with SMTP id a36mr7357701ybd.337.1271775349839; Tue, 20 Apr 2010 07:55:49 -0700 (PDT) Message-ID: Subject: Re: How to disconnect a single user in Postgresql 8.2.5 from a database From: Scott Marlowe To: Lewis Kapell Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/274 X-Sequence-Number: 34368 Ahhh, ok. On Tue, Apr 20, 2010 at 7:52 AM, Lewis Kapell wrote= : > pg_cancel_backend() and pg_terminate_backend() do different things. From = the > documentation: > > pg_cancel_backend(pid int) =A0 =A0 =A0Cancel a backend's current query > pg_terminate_backend(pid int) =A0 Terminate a backend > > > > On 4/19/2010 11:07 PM, Scott Marlowe wrote: >> >> On Mon, Apr 19, 2010 at 8:10 PM, Tom Lane =A0wrote: >>> >>> Josh Kupershmidt =A0writes: >>>> >>>> pg_terminate_backend() is just a SQL wrapper around: >>>> =A0 =A0kill -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. >>> >>> The reason the function isn't there before 8.4 is that that's not >>> promised to work before 8.4 ... most of the time it will work, but >>> once in awhile you could get nasty side-effects. >> >> So, pg_cancel_backend(pid) is the 8.3 version, that may or may not >> always work then, right? >> > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > --=20 When fascism comes to America, it will be intolerance sold as diversity.