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

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
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 18:47:04
Message-ID: 86ha3qvuc7.fsf@jerry.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Si Chen <sichen(at)opensourcestrategies(dot)com> writes:

> Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time?

I've seen recent discussion in hackers that this may be added to an
upcoming release.

> On Wed, Jun 11, 2014 at 3:41 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>
> On Wed, Jun 11, 2014 at 5:37 PM, Si Chen
> <sichen(at)opensourcestrategies(dot)com> wrote:
> > The state is "idle".  I don't have the state_change, but I will try to
> > collect it if it happens again.
>
> If they are idle, then the problem is probably with your application
> -- you're grabbing new connections and not closing them or reusing
> them.  It's a very common problem.  The 'query' when idle represents
> the last query run -- the database finished it and is sitting around.
>
> merlin
>
> --
> Si Chen
> Open Source Strategies, Inc.
> sichen(at)opensourcestrategies(dot)com
> http://www.OpenSourceStrategies.com
> LinkedIn: http://www.linkedin.com/in/opentaps
> Twitter: http://twitter.com/opentaps
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net
p: 312.241.7800

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vasudevan, Ramya 2014-06-12 18:51:38 Re: max_connections reached in postgres 9.3.3
Previous Message Jeff Janes 2014-06-12 18:35:13 Re: updates not causing changes