Pgpool-ii 3.7.5 не кэширует соединения pg

Разве pgpool не должен кэшировать серверные процессы PG? После отключения и повторного подключения pool_backendpid меняется.

Соответствующие параметры:

num_init_children = 1
max_pool = 1
child_life_time = 300
child_max_connections = 0
connection_life_time = 0
client_idle_limit = 0
connection_cache = on

Тестовое задание:

postgres@node3:/etc/pgpool2$ psql -p 5433 -U postgres postgres
psql (9.6.10)
Type "help" for help.

postgres=# show pool_pools;
LOG:  statement: show pool_pools;
 pool_pid |     start_time      | pool_id | backend_id | database | username |     create_time     | majorversion | minorversion | pool_counter | pool_backendpid | pool_connected 
----------+---------------------+---------+------------+----------+----------+---------------------+--------------+--------------+--------------+-----------------+----------------
 3569     | 2018-09-13 20:18:22 | 0       | 0          | postgres | postgres | 2018-09-13 20:25:04 | 3            | 0            | 1            | 3631            | 1
(1 row)

postgres=# \q
postgres@node3:/etc/pgpool2$ psql -p 5433 -U postgres postgres
psql (9.6.10)
Type "help" for help.

postgres=# show pool_pools;
LOG:  statement: show pool_pools;
 pool_pid |     start_time      | pool_id | backend_id | database | username |     create_time     | majorversion | minorversion | pool_counter | pool_backendpid | pool_connected 
----------+---------------------+---------+------------+----------+----------+---------------------+--------------+--------------+--------------+-----------------+----------------
 3569     | 2018-09-13 20:18:22 | 0       | 0          | postgres | postgres | 2018-09-13 20:25:15 | 3            | 0            | 1            | 3640            | 1
(1 row)
0
0
79
1

Ответы 1

Выяснили почему:

connection_cache (boolean)

Caches connections to backends when set to on. Default is on. However, 
connections to template0, template1, postgres and regression databases 
are not cached even if connection_cache is on.

Я подключался к базе данных postgres.

Другие вопросы по теме