[pgpool-general: 3196] Re: documentation error?

Tatsuo Ishii ishii at postgresql.org
Thu Sep 25 10:38:26 JST 2014


> Great!
> 
> Can you also explain what does this mean? I have 4 DB nodes and once I open
> a single DB connection in my client I see in pool_pools that it created 4
> connections (one per backend) in the same pool. Why are they created
> together?

Because some query needs to be sent to all backends. For example, SET.
Another use case is:

you start transaction by "BEGIN". This should be sent to all backends.
you issue SELECT on standby because of load balancing.
you issue UPDATE. this needs to be executed on primary.
you issue END. This should be sent to all backends.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Are they somehow related or are they independent connections like
> any other connection?

They are related and managed by pgool-II together.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> On Thu, Sep 25, 2014 at 3:38 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:
> 
>> Good catch! I'll fix the docs.
>>
>> Best regards,
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
>>
>> > Hi
>> >
>> > I think there is a mistake in the documentation.
>> >
>> > It says this about "show pool_pools": "It'll always return
>> > num_init_children*max_pool lines."
>> >
>> > However I have multiple backends (load balance mode) and for me it
>> returns
>> > num_init_children*max_pool*num_backends lines.
>> >
>> > For example num_init_children=1, max_pool=3, with 2 backends:
>> >
>> >  pool_pid |     start_time      | pool_id | backend_id |   database    |
>> >   username     |     create_time     | majorversion | minorversion |
>> > pool_counter | pool_backendpid | pool_connected
>> >
>> ----------+---------------------+---------+------------+---------------+------------------+---------------------+--------------+--------------+--------------+-----------------+-----------
>> > -----
>> >  10692    | 2014-09-23 16:25:09 | 0       | 0          |               |
>> >                |                     | 0            | 0            | 0
>> >        | 0               | 0
>> >  10692    | 2014-09-23 16:25:09 | 0       | 1          |               |
>> >                |                     | 0            | 0            | 0
>> >        | 0               | 0
>> >  10692    | 2014-09-23 16:25:09 | 1       | 0          |               |
>> >                |                     | 0            | 0            | 0
>> >        | 0               | 0
>> >  10692    | 2014-09-23 16:25:09 | 1       | 1          |               |
>> >                |                     | 0            | 0            | 0
>> >        | 0               | 0
>> >  10692    | 2014-09-23 16:25:09 | 2       | 0          |               |
>> >                |                     | 0            | 0            | 0
>> >        | 0               | 0
>> >  10692    | 2014-09-23 16:25:09 | 2       | 1          |               |
>> >                |                     | 0            | 0            | 0
>> >        | 0               | 0
>> >
>> >
>> >
>> http://www.pgpool.net/docs/pgpool-II-3.3.3/doc/pgpool-en.html#master_slave_mode
>> >
>> > Thanks,
>> > Yaron
>>
> 
> 
> 
> -- 
> 
> I'm on Twitter (@YaronNaveh <http://twitter.com/#!/YaronNaveh>)


More information about the pgpool-general mailing list