Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DE27C475D84 for ; Thu, 14 Nov 2002 10:59:49 -0500 (EST) Received: from mx6.mail.ru (mx6.mail.ru [194.67.57.16]) by postgresql.org (Postfix) with ESMTP id EE143475BF9 for ; Thu, 14 Nov 2002 10:59:48 -0500 (EST) Received: from drweb by mx6.mail.ru with drweb-scanned (Exim MX.6) id 18CMPI-0002s8-00; Thu, 14 Nov 2002 18:59:52 +0300 Received: from [213.128.193.142] (helo=mail.ru) by mx6.mail.ru with esmtp (Exim SMTP.6) id 18CMPI-0002o0-00; Thu, 14 Nov 2002 18:59:52 +0300 Message-ID: <3DD3C872.6010001@mail.ru> Date: Thu, 14 Nov 2002 18:59:46 +0300 From: dima <_pppp@mail.ru> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.0) Gecko/20020816 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: "A.M." Cc: pgsql-admin@postgresql.org Subject: Re: Weird processes References: <50EB5BF5-F7E8-11D6-A8DF-0030657192DA@cmu.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/151 X-Sequence-Number: 6339 Unfortunately Apache::DBI handles per-process connections only. So, almost any httpd child will hold all the connections. If you use user sessions as well, you'll run even into more serious troubles. > What you're looking for is SQLRelay. You will need to work a little bit > around the DBI driver to get the cached connections, but since the > driver uses its native interface, this is possible (or you can scrap DBI > altogether- not recommended). Get it here: > http://taonix.org/ > because firstworks.com has been down for months. > It's works great. The other probably better option (though not always > possible to use) would be mod_perl and Apache::DBI connection pooling. > This would be the easiest solution because it would require > minimal-to-none code changes. > While it would be possible to collect db handles in shared memory, > it would still require a persistently running daemon- SQLRelay does > essentially that, only it has more features. Apache::DBI caches the > handles in Apache space and hands you the handle that has exactly the > same connection parameters and is more configurable as a connection pooler. > Good luck. > > On Thursday, November 14, 2002, at 03:03 AM, Chris Miles wrote: > >> On Thu, Nov 14, 2002 at 10:47:20AM +0300, dima wrote: >> >>> 2) think about writing a server which would provide cgi scripts with >>> cached connections; you can $handle->prepare(...) the most common >>> queries as well. >> >> >> This seems like a common requirement. Are there any such tools which >> can be run in a web server (or similar) environment to keep a pool >> of postgresql connections, and perhaps cache common queries also? >> >> Regards, >> Chris >> >> -- >> Chris Miles >> chris_pg002@psychofx.com >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 3: if posting/reading through Usenet, please send an appropriate >> subscribe-nomail command to majordomo@postgresql.org so that your >> message can get through to the mailing list cleanly >> >> > ><><><><><><><><>< > AgentM > agentm@cmu.edu > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > >