Fix the incorrect display of load balancing node in raw mode.
authorBo Peng <pengbo@sraoss.co.jp>
Wed, 18 Aug 2021 08:00:28 +0000 (17:00 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Wed, 18 Aug 2021 08:04:37 +0000 (17:04 +0900)
In raw mode, Pgpool-II sends all queies to main node.
This is harmless, but it may confuse users.

src/context/pool_session_context.c

index 36b3c107efdb4c0537e8a5c568f3a313b9e3e79b..6966290b9e4bb01073bdd7434615e6e29df619d2 100644 (file)
@@ -98,7 +98,7 @@ void pool_init_session_context(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *
        pool_reset_preferred_master_node_id();
 
        /* Choose load balancing node if necessary */
-       if (pool_config->load_balance_mode)
+       if (!RAW_MODE && pool_config->load_balance_mode)
        {
                node_id = select_load_balancing_node();
        }