Re: how to PG close session - Mailing list pgsql-admin

From Little, Douglas
Subject Re: how to PG close session
Date
Msg-id 8585BA53443004458E0BAA6134C5A7FB19520873@EGEXCMB01.oww.root.lcl
Whole thread Raw
In response to Re: how to PG close session  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: how to PG close session
List pgsql-admin
Hey Kevin,

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

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


-----Original Message-----
From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov]
Sent: Friday, October 01, 2010 9:01 AM
To: Little, Douglas; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] how to PG close session

"Little, Douglas" <DOUGLAS.LITTLE@orbitz.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.

A relatively small number of such connections shouldn't be a
problem.  It's hard to make concrete suggestions on so little
information, but I would point out that you can write and install
your own functions which can do just about anything you want,
including making network connections.  So, hypothetically, you could
register to receive certain information on a certain event in some
"requests" table, with a URL to signal when the event occurs, and
disconnect.  Some trigger could recognize that an event has
occurred, and call a function to signal the given URL.

Just about anything is possible, it's just a Simple Matter Of
Programming....

-Kevin

pgsql-admin by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: how to PG close session
Next
From: "Kevin Grittner"
Date:
Subject: Re: how to PG close session