[pgpool-committers: 3269] pgpool: Fix bug with load balance node id info on shmem

Tatsuo Ishii ishii at postgresql.org
Wed Jun 15 17:14:01 JST 2016

Fix bug with load balance node id info on shmem

There are few places where the load balance node was mistakenly put on
wrong place. It should be placed on:
ConnectionInfo *con_info[child id, connection pool_id, backend id].load_balancing_node].
In fact it was placed on:
*con_info[child id, connection pool_id, 0].load_balancing_node].

As long as the backend id in question is 0, it is ok. However while
testing pgpool-II 3.6's enhancement regarding failover, if primary
node is 1 (which is the load balance node) and standby is 0, a client
connecting to node 1 is disconnected when failover happens on node
0. This is unexpected and the bug was revealed.

It seems the bug was there since long time ago but it had not found
until today by the reason above.



Modified Files
src/context/pool_session_context.c | 14 ++++++++++----
src/protocol/pool_process_query.c  | 12 +++++++++++-
2 files changed, 21 insertions(+), 5 deletions(-)

More information about the pgpool-committers mailing list