Re: how to PG close session

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: how to PG close session
Дата
Msg-id 4CA5A8E402000025000362C8@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: how to PG close session  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
Ответы Re: how to PG close session  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
Список pgsql-admin
"Little, Douglas" <DOUGLAS.LITTLE@orbitz.com> wrote:
> Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov] wrote:
>> "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.

>> 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Little, Douglas"
Дата:
Сообщение: Re: how to PG close session
Следующее
От: Kenichiro Tanaka
Дата:
Сообщение: Re: I can't get postgres started.