[pgpool-general: 2859] Re: PgPool connection caching/pooling not working ?

Tatsuo Ishii ishii at postgresql.org
Tue May 20 18:37:49 JST 2014


> 2014-05-20 10:56 GMT+02:00 Tatsuo Ishii <ishii at postgresql.org>:
>>> Thanks for your answer
>>>
>>> 2014-05-19 23:53 GMT+02:00 Tatsuo Ishii <ishii at postgresql.org>:
>>>
>>>> No. 32 concurrent connections.
>>>>
>>> If there is 32 connections on pgpool side and 32 on postgres side what is
>>> the goal of pooling?
>>
>> I said "concurrent" connections. Unlike PostgreSQL pgpool-II accepts
>> more than 32 connections from clients. For example if there are
>> concurrent 40 connections to pgpool-II, 32 out of 40 are executed by
>> PostgreSQL. Remaining 8 connections will be executed once one of 32
>> connections from clients are disconnected.
>>
> 
> I tried with 40 connections to pgpool with pgbench and in another
> windows I tried to open a new connection to pgpool : psql -h 10.0.0.2
> -p 5000 -U postgres
> I didn't get any response :(

See the FAQ:
http://www.pgpool.net/mediawiki/index.php/FAQ#When_I_run_pgbench_to_test_pgpool-II.2C_pgbench_hangs._If_I_directly_run_pgbench_against_PostgreSQL.2C_it_works_fine._Why.3F

>>>> Database "postgres", "template1" and "regression" are treated to not
>>>> cache any time. Please use other database name for connection cache
>>>> testing purpose.
>>>>
>>>>
>>> I created a new db "pgbench" and launch the test and I still have the same
>>> result :
>>
>> The slot "pool_connected" means has a connection from client, not
>> connection to PostgreSQL. If you want to know if the pool_id has a
>> connection to PostgreSQL, you check "pool_backendpid" slot. If this is
>> not space, the slot has a connection to PostgreSQL, which means the
>> connection is cached.
> 
> That was I thought . So If I do a test with pgbench, with 40
> connections, I will see 32 connections to postgres and 40 on pgpool.
> But I see 32 on pgpool and 32 on postgres?

No. pool_connected is set only when client connects to pgpool-II and
pgpool-II connects to PostgreSQL.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-general mailing list