Re: what does pg_activity mean when the database is stuck?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Si Chen <sichen(at)opensourcestrategies(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: what does pg_activity mean when the database is stuck?
Date: 2014-06-12 09:34:52
Message-ID: CAB7nPqRgubA_CS1QAvt-fQXAPAZndygy0afysF8AxL0tn42Ytg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 12, 2014 at 11:44 AM, Si Chen
<sichen(at)opensourcestrategies(dot)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.
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2014-06-12 09:36:16 Re: what does pg_activity mean when the database is stuck?
Previous Message Ian Barwick 2014-06-12 09:13:07 Re: Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml