Re: Safe to kill idle connections? - Mailing list pgsql-general

From Thomas Beutin
Subject Re: Safe to kill idle connections?
Date
Msg-id 43534754.8050402@laokoon.in-berlin.de
Whole thread Raw
In response to Safe to kill idle connections?  (Francisco Reyes <lists@natserv.com>)
List pgsql-general
Francisco Reyes wrote:
> Ever since I installed a particular program, PHPWiki, I am seeing idle
> postgres sessions.. even days old. Is it safe to delete them?
I wouln't do that. These seems to be php persistent connections, and
they are idle for the moment but reused for new wiki requests.
http://www.php.net/pg_pconnect

> For example:
> postmaster: wiki simplicato_wiki [local] idle (postgres)
>
> Ultimately I will either switch wiki or take the time and find the piece
> of code that is causing the sessions to remain open, but until then
> don't want to leave those idle sessions around.. for days.
If there is no configuration switch, search for pg_pconnect in the code
and replace it with pg_connect, but if You're running a site with heavy
traffic i recommend to use the persistent connections for performance
reasons.

Cheers,
-tb
--
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

pgsql-general by date:

Previous
From: Oleg
Date:
Subject: Re: Anybody using PostGIS?
Next
From: Devrim GUNDUZ
Date:
Subject: Re: Anybody using PostGIS?