Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 79ABD632EB6 for ; Tue, 20 Apr 2010 00:08:19 -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 51975-01-7 for ; Tue, 20 Apr 2010 03:08:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gw0-f46.google.com (mail-gw0-f46.google.com [74.125.83.46]) by mail.postgresql.org (Postfix) with ESMTP id 584DC633D01 for ; Tue, 20 Apr 2010 00:07:01 -0300 (ADT) Received: by gwj19 with SMTP id 19so589069gwj.19 for ; Mon, 19 Apr 2010 20:07:00 -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=RCeUVSqbIZ1Wy+/Uvym+ZhLwRXyx2mlv9nXYdIuVa7g=; b=t5YlSuu9wj4wfvA0hXd0kv1dkxttquPi7huK2sBHFu216Dqb9GBZeLxKAny8jVzdj5 N1WuBh7o16lpmYYORmnfyidaZsWjXfKEsf0tzHYLMyTp2uZWu5HoDxew/qUGAizxbsF3 H3n6EnWJNIMpGlqINWyCdHdlRgp2tVAKzchKY= 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=lxzzRDUg13xJpuC/suki24v1KYMG0anMTloIh+lflGG7o5bnKCnMPI4GEn5ilLs0NW AHVRMQBuC7UCXkTqTdLVzGnpOLRWTqhS6/BjPau4YRTWi1A4uhdiYhzhz4oaeQ9cchdE 6H3Nlf7XylE5GXHo+s9G29+RXwNm6G+rCOqew= MIME-Version: 1.0 Received: by 10.150.218.9 with HTTP; Mon, 19 Apr 2010 20:07:00 -0700 (PDT) In-Reply-To: <15823.1271729409@sss.pgh.pa.us> References: <480516.98593.qm@web28311.mail.ukl.yahoo.com> <15823.1271729409@sss.pgh.pa.us> Date: Mon, 19 Apr 2010 21:07:00 -0600 Received: by 10.150.253.2 with SMTP id a2mr6693685ybi.42.1271732820552; Mon, 19 Apr 2010 20:07:00 -0700 (PDT) Message-ID: Subject: Re: How to disconnect a single user in Postgresql 8.2.5 from a database From: Scott Marlowe To: Tom Lane Cc: Josh Kupershmidt , Sergey Konoplev , Steph L , 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/266 X-Sequence-Number: 34360 On Mon, Apr 19, 2010 at 8:10 PM, Tom Lane wrote: > Josh Kupershmidt writes: >> 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?