Re: Keeping processes open for re-use

From: Richard Huxton <dev(at)archonet(dot)com>
To: Jean-Max Reymond <jmreymond(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Keeping processes open for re-use
Date: 2006-11-17 11:20:52
Message-ID: 455D9B14.7030407@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jean-Max Reymond wrote:
> 2006/11/10, Joshua D. Drake <jd(at)commandprompt(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kenneth Marshall 2006-11-17 14:26:57 Re: [PERFORM] BUG #2737: hash indexing large tablefails, while btree of same index works
Previous Message Simon Riggs 2006-11-17 10:59:11 Re: [PERFORM] BUG #2737: hash indexing large tablefails, while btree of same index works