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

From: Emi <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Auto close idle connections for specific user (not by pg_cancel command)
Date: 2019-02-05 17:47:10
Message-ID: 77b0f43d-2397-d204-e569-b41f0f79361c@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Thanks a lot.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2019-02-05 17:51:59 Re: Auto close idle connections for specific user (not by pg_cancel command)
Previous Message Adrian Klaver 2019-02-05 15:44:27 Re: Connection issue