Re: Release connections in MODPERL

Поиск
Список
Период
Сортировка
Искать
От
D. Duccini
Тема
Re: Release connections in MODPERL
Дата
Msg-id
Pine.GSO.4.03.10101102222130.15889-100000@ra.bpsi.net
Ответ на
Список
Дерево обсуждения
Release connections in MODPERL "D. Duccini" <duccini@backpack.com>
Re: Release connections in MODPERL "Brett W. McCoy" <bmccoy@chapelperilous.net>
Re: Release connections in MODPERL Neil Conway <nconway@klamath.dyndns.org>
Re: Release connections in MODPERL "Brett W. McCoy" <bmccoy@chapelperilous.net>
Re: Release connections in MODPERL "D. Duccini" <duccini@backpack.com>
Re: Release connections in MODPERL "Brett W. McCoy" <bmccoy@chapelperilous.net>
Re: Release connections in MODPERL "D. Duccini" <duccini@backpack.com>
Re: Release connections in MODPERL "Brett W. McCoy" <bmccoy@chapelperilous.net>

Get this, all it takes to release the connection (since PQfinish() doesn't
work and there isn't any Pg::disconnectdb() )

is to set the your handle to null !!

PERL's garbage collection picks it up and voila!  no extra processes
hanging in memory.

so if you do this:

 $DBNAME = 'template1';
 $SQLCONNECT = "dbname = " . $DBNAME; 
 $SQL = Pg::connectdb($SQLCONNECT);

you can simply do this:

$SQL = null;

otherwise Apache/modperl holds onto the connection and the number of
postmaster tasks in memory grows

-----------------------------------------------------------------------------
david@backpack.com            BackPack Software, Inc.        www.backpack.com
+1 651.645.7550 voice       "Life is an Adventure.    
+1 651.645.9798 fax            Don't forget your BackPack!"   
-----------------------------------------------------------------------------

В списке pgsql-novice по дате отправления
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: MSSQL to PgSQL
От: Karla Peralta
Дата:
Сообщение: Encrypt
FAQ