Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id A7A7D9FB2D8 for ; Thu, 9 Nov 2006 22:18:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 47235-08 for ; Thu, 9 Nov 2006 22:18:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 9B0799FB2D3 for ; Thu, 9 Nov 2006 22:18:19 -0400 (AST) Received: from [192.168.1.95] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id kAA2I80Y031172 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Thu, 9 Nov 2006 18:18:09 -0800 Subject: Re: Keeping processes open for re-use From: "Joshua D. Drake" To: Shane Ambler Cc: Csaba Nagy , Hilary Forbes , postgres performance list In-Reply-To: <4553DF77.7030000@007Marketing.com> References: <5.1.0.14.0.20061109123348.0418fbb8@mailserver.dmr.co.uk> <1163076964.2839.1.camel@coppola.muc.ecircle.de> <4553DF77.7030000@007Marketing.com> Content-Type: text/plain Organization: Command Prompt, Inc. Date: Thu, 09 Nov 2006 18:19:11 -0800 Message-Id: <1163125151.28784.154.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Thu, 09 Nov 2006 18:18:09 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/91 X-Sequence-Number: 21861 On Fri, 2006-11-10 at 12:39 +1030, Shane Ambler wrote: > Csaba Nagy wrote: > > On Thu, 2006-11-09 at 13:35, Hilary Forbes wrote: > >> [snip] Is there a way that we can achieve this in Postgres? We have a > >> situation whereby we have lots of web based users doing short quick > >> queries and obviously the start up time for a process must add to > >> their perceived response time. > > > > Yes: google for "connection pooling". Note that different solutions > > exist for different programming languages, so you should look for > > connection pooling for the language you're using. > > > > If you are using PHP then persistent connections may be a simpler way if > it is enough for your needs. I would actually suggest pg_pool over pg_pconnect. Joshua D. Drake > > Basically replace pg_connect with pg_pconnect > > Other languages may have a similar option. > > http://php.net/manual/en/features.persistent-connections.php > > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate