[pgpool-general: 7113] Re: Pooling doesn't appear to be working.

Tatsuo Ishii ishii at sraoss.co.jp
Thu Jul 2 06:46:30 JST 2020


> Hi Guys,
> 
> When I list the output of SHOW POOL_POOLS, all the pools have a pool_counter=1
> and a distinct pool_backendpid.  To me this means that even though I have
> the same users connecting, with the same major/minor, connection pools
> aren't being reused.  Is that correct?  Here's a snippet (I have three
> backends):
> 
>  141204   | 2020-07-01 11:04:21 | 0       | 0          | mobile-search-bff
>               | v-token-mo-mobile-s-yAjmcIzpEvK | 2020-07-01 12:16:19 | 3
>          | 0            | 1            | 12047           | 1
>  141204   | 2020-07-01 11:04:21 | 0       | 1          | mobile-search-bff
>               | v-token-mo-mobile-s-yAjmcIzpEvK | 2020-07-01 12:16:19 | 3
>          | 0            | 1            | 60420           | 1
>  141204   | 2020-07-01 11:04:21 | 0       | 2          | mobile-search-bff
>               | v-token-mo-mobile-s-yAjmcIzpEvK | 2020-07-01 12:16:19 | 3
>          | 0            | 1            | 137228          | 1
[snip]
> The only thing I can think of is that it may have something to do with the
> user names (these are Vault-generated users).
> 
> I do have the connection cache parameter on:
> 
> connection_cache on
> 
> I'm using PgPool-II v. 4.1.1.

Yes, that's an expected behavior. The OS feels free to assign a
pool_pid for a client connection to any of pre-forked pool_pid. The OS
does not care whether the pool_pid already has a connection pool to
backend. So until all pool_pid have same connection pool (same
user/database pair), it may be possible that pool_counter remains 1.

The FAQ explains this in a different way.
https://pgpool.net/mediawiki/index.php/FAQ#Is_connection_pool_cache_shared_among_pgpool_process.3F

Best regards,
--
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