Re: how to PG close session

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Douglas Little" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: how to PG close session
Date: 2010-10-01 14:24:52
Message-ID: 4CA5A8E402000025000362C8@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com> wrote:
> Kevin Grittner [mailto:Kevin(dot)Grittner(at)wicourts(dot)gov] wrote:
>> "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com> wrote:
>>
>>> We have a number of long running java/jdbc applications that
>>> wait for events and then extract data from PG.
>>> During the time the apps are running, The app is maintaining
>>> active connections to PG.
>>> Is there a way that we can close/terminate the pg session so
>>> that the connections don't consume resource unnecessarily.

>> Some trigger could recognize that an event has occurred, and call
>> a function to signal

> Currently it's keeping 16 open connections and it isn't even
> running. I believe that they(finance) can run 5 concurrent java
> apps and each opens a number of sessions. Currently all 16
> sessions are owned by 1 datid. So potentially it's 80
> connections, this is on top of all our cognos (which also leaves
> connections open). We're typically have 80 - 300 connections
> open.

Oh, these connections aren't waiting for *database* events? Then
you should either restructure the apps or use a connection pool.
Two popular "drop in" connection poolers are pgbouncer and pgpool.

> I'm really looking for the PG command to close a session.

http://www.postgresql.org/docs/current/interactive/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL-TABLE

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Little, Douglas 2010-10-01 15:52:39 Re: how to PG close session
Previous Message Little, Douglas 2010-10-01 14:12:57 Re: how to PG close session