pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Lewis Kapell <lkapell@setonhome.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to disconnect a single user in Postgresql 8.2.5 from a database
Date: Tue, 20 Apr 2010 08:55:49 -0600
Message-ID: <l2zdcc563d11004200755g3c18586es15d1dbc41615f716@mail.gmail.com> (raw)
In-Reply-To: <4BCDB1B7.1010603@setonhome.org>
References: <480516.98593.qm@web28311.mail.ukl.yahoo.com>
	<l2nc3a7de1f1004190852nbbfb67f3v9cba052fdbb0b599@mail.gmail.com>
	<z2j4ec1cf761004191824ibad49657odff2914710d343fc@mail.gmail.com>
	<15823.1271729409@sss.pgh.pa.us>
	<h2vdcc563d11004192007u167088d7g77900fca2c3a40e3@mail.gmail.com>
	<4BCDB1B7.1010603@setonhome.org>

Ahhh, ok.

On Tue, Apr 20, 2010 at 7:52 AM, Lewis Kapell <lkapell@setonhome.org> wrote:
> pg_cancel_backend() and pg_terminate_backend() do different things. From the
> documentation:
>
> pg_cancel_backend(pid int)      Cancel a backend's current query
> pg_terminate_backend(pid int)   Terminate a backend
>
>
>
> On 4/19/2010 11:07 PM, Scott Marlowe wrote:
>>
>> On Mon, Apr 19, 2010 at 8:10 PM, Tom Lane<tgl@sss.pgh.pa.us>  wrote:
>>>
>>> Josh Kupershmidt<schmiddy@gmail.com>  writes:
>>>>
>>>> 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.
>>>
>>> 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
>



-- 
When fascism comes to America, it will be intolerance sold as diversity.



view thread (10+ messages)  latest in thread

Message-ID: <l2zdcc563d11004200755g3c18586es15d1dbc41615f716@mail.gmail.com>
Permalink:  ../l2zdcc563d11004200755g3c18586es15d1dbc41615f716@mail.gmail.com/
Also on:    postgresql.org/message-id/l2zdcc563d11004200755g3c18586es15d1dbc41615f716@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: scott.marlowe@gmail.com, lkapell@setonhome.org
  Subject: Re: How to disconnect a single user in Postgresql 8.2.5 from a database
  In-Reply-To: <l2zdcc563d11004200755g3c18586es15d1dbc41615f716@mail.gmail.com>
  References: <480516.98593.qm@web28311.mail.ukl.yahoo.com> <l2nc3a7de1f1004190852nbbfb67f3v9cba052fdbb0b599@mail.gmail.com> <z2j4ec1cf761004191824ibad49657odff2914710d343fc@mail.gmail.com> <15823.1271729409@sss.pgh.pa.us> <h2vdcc563d11004192007u167088d7g77900fca2c3a40e3@mail.gmail.com> <4BCDB1B7.1010603@setonhome.org> <l2zdcc563d11004200755g3c18586es15d1dbc41615f716@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox