From: | Brandon Phelps <bphelps(at)gls(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Connection Pooling |
Date: | 2011-10-07 19:45:00 |
Message-ID: | 4E8F56BC.7010207@gls.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Forgive me, I'm still a bit confused by how max_pool works with num_init_children. First you said that at most I can have 32 clients sending queries, but then you said that each process can handle 4 different connections... so does this mean that I can have 128 connections from pgpool to my postgresql database?
Sorry, not quite understanding.
On 10/07/2011 02:05 PM, Guillaume Lelarge wrote:
> On Fri, 2011-10-07 at 13:51 -0400, Brandon Phelps wrote:
>> So we decided to go with pgpool-II. The documentation is a little lacking for pgpool-II so I have one question:
>>
>> How are connections handled once the default levels are reached? Here are my pgpool settings:
>>
>> num_init_children = 32
>> max_pool = 4
>>
>
> This configuration means you can have at most 32 clients sending queries
> at the same time to PostgreSQL via pgpool. With a max_pool of 4, each
> pgpool process can handle four different connections to the same server:
> they could differ either by the database name or by the user name.
>
>> This creates 32 child processes when we start pgpool which I understand. Each time I browse to a page from our web app and do a netstat -an on the web server (running pgpool) I see an additional connection to the database server, which looks good. I assume that once 32 connections are opened at once then pgpool will start re-using them, based on the num_init_children * max_pool... But since 32 * 4 = 128, what will happen on the 129th connection? Will a new child get created, allowing for 4 more connections (1 * max_pool), or will that connection be denied?
>>
>
> Connection is not denied (that would be the behaviour of PostgreSQL).
> Connection is on hold waiting for a pgpool process to be available.
> Meaning you don't want long connections.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Derrick Rice | 2011-10-07 20:05:36 | Re: Postgres 8.4: archive_timeout vs. checkpoint_timeout |
Previous Message | Bosco Rama | 2011-10-07 18:48:51 | select vs cursor/fetch speed disparity |