Re: Connections - Postgres 9.2

Поиск
Список
Период
Сортировка
От Sridhar N Bamandlapally
Тема Re: Connections - Postgres 9.2
Дата
Msg-id CAGuFTBWynm4pz6EAFV1XSwr-z__DnqAFJ5YOhUG1THa72qoWZA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Connections - Postgres 9.2  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Hi


I control this way


if "state_change" is from longtime and "state" is idle then I use

function:
  pg_terminate_backend ( integer )  ==> return TRUE if killed-successful else FALSE

example:
# select pg_terminate_backend ( pid ) from pg_stat_activity where state='idle' and state_change < (current_timestamp - interval '1 hour');


may be helpful

NOTE: we come to decision to kill sessions in idle state more then "1 hour" after lot of discussion with application / implementation / stake-holders team


Thanks
Sridhar 
OpenText



On Mon, May 16, 2016 at 9:57 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Sun, May 15, 2016 at 10:10 PM, Lucas Possamai <drum.lucas@gmail.com> wrote:
Hi guys,

Inline images 1

Those IDLE connections, might be because the user/application didn't commit the transaction?

​No, that is what the yellow-ish "Idle in transaction" would indicate.

Idle is simply remote clients actively logged into the server but not doing anything.

David J.


Вложения

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

Предыдущее
От: Viswanath
Дата:
Сообщение: Re: Update or Delete causes canceling of long running slave queries
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Thoughts on "Love Your Database"