[Pgpool-general] question about total postgresql connections = num_init_children*max_pool

Yoshiharu Mori y-mori at sraoss.co.jp
Tue Jun 19 09:12:41 UTC 2007


Hi,

> Greetings all,
> 
> I have a question regarding the num_init_children & max_pool configuration
> in pgpool.conf.
> 
> Our databases are configured to accept 300 max connections each. We have
> four webservers each running pgpool II.
> 
> The pgpool.conf has:
> 
> num_init_children = 75
> max_pool = 4
> 
> Our web application runs all connections under the same user.
> 
> My understanding is that we'll keep maximum number of 75 connections open
> from each webserver to each database server. In a simple script, this
> verifies as true.

When connecting it from webserver with pgpool, 75 users (/one pgpool) can be connected 
because num_init_children sets the number that can be connected with pgpool
at the same time. And,It is necessary to set the number of (num_init_children x max_pool)
 or more to max_connections of postgresql. 

> 
> (1) The question is, which user (OS or Postgres) is the user that opens a
> new pool?

It is Postgres.

> 
> (2) In my configuration, if I were to make new connections with a new user
> in (1) I could potentially go over my max connections set in Postgres,
> correct?

Yes. There is a possibility to exceed the maximum, connected number of postgresql 
when connecting it with pgpool by two or more users because there are four pgpool. 


> (3) What are the ideal settings if I'm making all connections through one
> user?

If connected DB from pgpool is one and one user, 
I think it is good in max_pool=1 and num_init_children=75. 

-- 
SRA OSS, Inc. Japan
Yoshiharu Mori <y-mori at sraoss.co.jp>
http://www.sraoss.co.jp/




More information about the Pgpool-general mailing list