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:48:36 +0000 (11:48 +0900)
commitb47a050be64183809f82a458e19eef73becf4475
treef00e81fd7b9f401b81aa61f168417b3902ba65c9
parent25e5292f97a4f3b78c950dfc0f53e4e89ec56a48
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]