[Pgpool-general] (pgpool-II) num_init_children misleading?

Yoshiyuki Asaba y-asaba at sraoss.co.jp
Thu Jul 26 04:55:52 UTC 2007


Hi,

From: "Felix J. Ogris" <fjo-lists at ogris.de>
Subject: [Pgpool-general] (pgpool-II) num_init_children misleading?
Date: Wed, 25 Jul 2007 17:26:34 +0200

> I am not able to open more than num_init_children connections to pgpool-II
> (verified with 1.1.1 and 2.0-devel from yesterday's CVS checkout). I thought
> that num_init_children is only a hint how many workers should be forked on
> startup. I have appended my current config below. Am I right or have I
> overseen something?

num_init_children is the number of workers. One process can handle one
active session.

  client-1 <--> pgpool-1
  client-2 <--> pgpool-2
  ...

If the number of client is greater than num_init_children, new clients
wait until other client finishes. 

Each process has connection cache slot. Its size is set by
max_pool. For example, if max_pool is 3, a process holds three caches
which are identified by user name and database name.

          | <---> PostgreSQL (user: x, database: y)
  pgpool-1| <---> PostgreSQL (user: x, database: z)
          | <---> PostgreSQL (user: y, database: z)

So max_connections in postgresql.conf need to be equal or greater than
num_init_children * max_pool.

Regards,
--
Yoshiyuki Asaba
y-asaba at sraoss.co.jp


More information about the Pgpool-general mailing list