Re: what does pg_activity mean when the database is stuck? - Mailing list pgsql-general

From Michael Paquier
Subject Re: what does pg_activity mean when the database is stuck?
Date
Msg-id CAB7nPqSQaKn4FXH+bneq79UBZoT+s01aW=_5FcF4nKb=Gr27LA@mail.gmail.com
Whole thread Raw
In response to Re: what does pg_activity mean when the database is stuck?  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
On Thu, Jun 12, 2014 at 6:34 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Thu, Jun 12, 2014 at 11:44 AM, Si Chen
> <sichen@opensourcestrategies.com> wrote:
>> Is there a way to configure postgresql to automatically release connections
>> that have been idle for a set amount of time?
> Not directly. However with 9.3 you could use a background worker like this one:
> https://github.com/michaelpq/pg_plugins/tree/master/kill_idle
> It tracks connections that have been idle for a given amount of time
> and closes them with pg_terminate_backend when theyr are idle for a
> amount of time longer than the one set.
Just adding that this bgworker is rather experimental, and that the
common recoommendation is to have your application close correctly the
connection it uses...
--
Michael


pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: what does pg_activity mean when the database is stuck?
Next
From: Khangelani Gama
Date:
Subject: Re: Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml