Search Postgresql Archives

Re: Auto close idle connections for specific user (not by pg_cancel command)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi


út 5. 2. 2019 v 18:47 odesílatel Emi <emilu@xxxxxxxxxxxxxxxxx> napsal:
Hello,
 
In psql, may I know is there a way/config that idle connections could be auto closed (but not by
pg_cancel_backend command) for specific user(s) please?

For example, 
select  usename, waiting, query_start  from pg_stat_activity 
where usename like 'connUser1' and
           current_query='<IDLE>';

All connections from connUser1, if idle more than 1 day, psql auto close them.

What I know, there is not any timeout for this purpose.

Maybe pgbouncer can do this https://pgbouncer.github.io/config.html

client_idle_timeout

Regards

Pavel

Thanks a lot.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux