Re: Is there a way to kill a connection from the pg_stat_activitly list?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Jessica Richard" <rjessil(at)yahoo(dot)com>
Cc: "Tommy Gildseth" <tommy(dot)gildseth(at)usit(dot)uio(dot)no>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?
Date: 2007-10-15 17:34:27
Message-ID: dcc563d10710151034l77eddc60s7974ae84821b5124@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 10/15/07, Jessica Richard <rjessil(at)yahoo(dot)com> wrote:
> Thanks a lot!
>
> "select pg_cancel_backend(procpid) " can end the current query for that
> user, but then this connection becomes IDLE, still connected.
>
> Is there a command for me to totally disconnect a user by procpid? Some
> times, I need to kick out a particular Postgres user completely.

From the command line on the server you can issue a kill <pid> to do
that. From within pgsql you'd need to write a function in an
untrusted language to pull it off.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jonah H. Harris 2007-10-15 17:34:50 Re: Is there a way to kill a connection from the pg_stat_activitly list?
Previous Message Jessica Richard 2007-10-15 17:18:24 Re: Is there a way to kill a connection from the pg_stat_activitly list?