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

Поиск
Список
Период
Сортировка
От Jessica Richard
Тема Re: Is there a way to kill a connection from the pg_stat_activitly list?
Дата
Msg-id 382292.68410.qm@web56406.mail.re3.yahoo.com
обсуждение исходный текст
Ответ на Re: Is there a way to kill a connection from the pg_stat_activitly list?  (Tommy Gildseth <tommy.gildseth@usit.uio.no>)
Ответы Re: Is there a way to kill a connection from the pg_stat_activitly list?
Re: Is there a way to kill a connection from the pg_stat_activitly list?
Список pgsql-admin
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.

thanks


Tommy Gildseth <tommy.gildseth@usit.uio.no> wrote:
Jessica Richard wrote:
> When you see a hanging Postgres connection (or a job running so long
> and you don't want to continue any more) from
>
> select * from pg_stat_activity
>
> and you want to disconnect it,
>
> how do you do it?

|pg_cancel_backend()


|http://www.postgresql.org/docs/8.1/interactive/functions-admin.html

--
Tommy Gildseth
DBA, Gruppe for databasedrift
Universitetet i Oslo, USIT
m: +47 45 86 38 50
t: +47 22 85 29 39


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Need a vacation? Get great deals to amazing places on Yahoo! Travel.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Is my database now too big?
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Is there a way to kill a connection from the pg_stat_activitly list?