From: Richard Huxton <dev@archonet.com>
To: Jean-Max Reymond <jmreymond@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Keeping processes open for re-use
Date: Fri, 17 Nov 2006 11:20:52 +0000
Message-ID: <455D9B14.7030407@archonet.com> (raw)
In-Reply-To: <4b09a0c0611160939h13be7da1n5a21def5f27fdae7@mail.gmail.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>
<1163125151.28784.154.camel@localhost.localdomain>
<4b09a0c0611160939h13be7da1n5a21def5f27fdae7@mail.gmail.com>
Jean-Max Reymond wrote:
> 2006/11/10, Joshua D. Drake <jd@commandprompt.com>:
>>
>> I would actually suggest pg_pool over pg_pconnect.
>>
>
> Please, can you explain advantages of pg_pool over pg_connect ?
He said pg_pconnect (note the extra "p"). This provides permanent
connections to the database from PHP. However, you will end up with one
connection per Apache process running (without running multiple Apache
setups to serve different content types). Since many processes will be
serving images or static content you have a lot of wasted, idle,
connections.
Now, pg_pool allows you to maintain a small number of active connections
(say 20 or 50) and have PHP connect to your pgpool server. It allocates
the next free connection it holds and so lets you minimise the number of
connections to PostgreSQL.
HTH
--
Richard Huxton
Archonet Ltd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: dev@archonet.com, jmreymond@gmail.com
Subject: Re: Keeping processes open for re-use
In-Reply-To: <455D9B14.7030407@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox