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

Tatsuo Ishii ishii at postgresql.org
Tue May 20 17:56:29 JST 2014


> 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.

>> 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.

>  pool_pid |     start_time      | pool_id | backend_id |   database    |
> username  |     create_time     | majorversion | minorversion |
> pool_counter | pool_backendpid | pool_connected
> ----------+---------------------+---------+------------+---------------+-----------+---------------------+--------------+--------------+--------------+-----------------+----------------
>  11276    | 2014-05-20 09:35:22 | 0       | 0          | pgbench       |
> postgres  | 2014-05-20 10:24:38 | 3            | 0            |
> 1            | 25966           | 1
>  11276    | 2014-05-20 09:35:22 | 1       | 0          |
> |           |                     | 0            | 0            |
> 0            | 0               | 0
>  11276    | 2014-05-20 09:35:22 | 2       | 0          |
> |           |                     | 0            | 0            |
> 0            | 0               | 0
>  11276    | 2014-05-20 09:35:22 | 3       | 0          |
> |           |                     | 0            | 0            |
> 0            | 0               | 0
>  28553    | 2014-05-20 08:45:22 | 0       | 0          | pgbench       |
> postgres  | 2014-05-20 10:24:38 | 3            | 0            |
> 1            | 25972           | 1
>  28553    | 2014-05-20 08:45:22 | 1       | 0          |
> |           |                     | 0            | 0            |
> 0            | 0               | 0
>  28553    | 2014-05-20 08:45:22 | 2       | 0          |
> |           |                     | 0            | 0            |
> 0            | 0               | 0
>  28553    | 2014-05-20 08:45:22 | 3       | 0          |
> |           |                     | 0            | 0            |
> 0            | 0               | 0


More information about the pgpool-general mailing list