Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4F8BD475EB9 for ; Thu, 14 Nov 2002 10:47:59 -0500 (EST) Received: from smtp6.andrew.cmu.edu (SMTP6.andrew.cmu.edu [128.2.10.86]) by postgresql.org (Postfix) with ESMTP id 43863475DDC for ; Thu, 14 Nov 2002 10:47:58 -0500 (EST) Received: from cmu.edu (MCUBE.RES.cmu.edu [128.2.161.131]) (user=amcauley mech=PLAIN (0 bits)) by smtp6.andrew.cmu.edu (8.12.3.Beta2/8.12.3.Beta2) with ESMTP id gAEFm1QA004322 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Thu, 14 Nov 2002 10:48:01 -0500 Date: Thu, 14 Nov 2002 10:47:01 -0500 Subject: Re: Weird processes Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v548) From: "A.M." To: pgsql-admin@postgresql.org Content-Transfer-Encoding: 7bit In-Reply-To: <20021114080318.B13886@psychofx.com> Message-Id: <50EB5BF5-F7E8-11D6-A8DF-0030657192DA@cmu.edu> X-Mailer: Apple Mail (2.548) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/150 X-Sequence-Number: 6338 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