Fix connection_life_time does not work.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Tue, 11 Aug 2020 01:26:43 +0000 (10:26 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Tue, 11 Aug 2020 02:41:00 +0000 (11:41 +0900)
commit39eb90fe199d03253b99bec38d85c40f66aa55ab
tree536ff9354cd997a36b95eeb8e4b0badee09cbbfe
parenta840ecb2c0aa15448f7fc63a7b0bb46949a9c24f
Fix connection_life_time does not work.

If master node is not 0 (this could happen in the case when primary
node is not 0 in streaming replication mode for example), pgpool
failed to find connection_life_time timer because the timer was set
only in virtual_master_node, which could be changed after session ends
since query context is not there any more.

To fix this, connection_life_time timer is set to all valid nodes.

Regression test is also added.

Discussion: https://www.pgpool.net/pipermail/pgpool-general/2020-August/007242.html
src/protocol/pool_connection_pool.c
src/test/regression/tests/031.connection_life_time/test.sh [new file with mode: 0755]