Re: How to disconnect a single user in Postgresql 8.2.5 from a database

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Lewis Kapell <lkapell(at)setonhome(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to disconnect a single user in Postgresql 8.2.5 from a database
Date: 2010-04-20 14:55:49
Message-ID: l2zdcc563d11004200755g3c18586es15d1dbc41615f716@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ahhh, ok.

On Tue, Apr 20, 2010 at 7:52 AM, Lewis Kapell <lkapell(at)setonhome(dot)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(at)sss(dot)pgh(dot)pa(dot)us>  wrote:
>>>
>>> Josh Kupershmidt<schmiddy(at)gmail(dot)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(at)postgresql(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-04-20 14:58:10 Re: How to disconnect a single user in Postgresql 8.2.5 from a database
Previous Message Scott Marlowe 2010-04-20 14:29:08 Re: How to disconnect a single user in Postgresql 8.2.5 from a database