[pgpool-committers: 5615] pgpool: New feature "statement_level_load_balancing".

Bo Peng pengbo at sraoss.co.jp
Tue Apr 2 10:16:54 JST 2019


New feature "statement_level_load_balancing".

This feature enables selecting load balancing node per statement.

The current feature for load balancing, the load balancing node is decided
at the session start time and will not be changed until the session ends.

When set to statement_level_load_balancing = on, the load balancing node
is decided for each read query.

For example, in applications that use connection pooling remain connections
open to the backend server, because the session may be held for a long time,
the load balancing node does not change until the session ends.
In such applications, when statement_level_load_balance is enabled,
it is possible to decide load balancing node per query, not per session.

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=1099ba610eef06a9dab6f89486cc52de55ff3ebb

Modified Files
--------------
doc.ja/src/sgml/loadbalance.sgml                   |  37 +++
doc/src/sgml/loadbalance.sgml                      |  23 ++
src/config/pool_config_variables.c                 |  10 +
src/context/pool_query_context.c                   |  21 +-
src/context/pool_session_context.c                 |  52 ++--
src/include/context/pool_query_context.h           |   2 +-
src/include/context/pool_session_context.h         |   6 +-
src/include/pool_config.h                          |   2 +
src/protocol/child.c                               |   4 +-
src/protocol/pool_proto_modules.c                  |   1 +
src/sample/pgpool.conf.sample                      |   3 +
src/sample/pgpool.conf.sample-logical              |   3 +
src/sample/pgpool.conf.sample-master-slave         |   3 +
src/sample/pgpool.conf.sample-replication          |   3 +
src/sample/pgpool.conf.sample-stream               |   3 +
.../expected/statement_level_load_balance.data     |  37 +++
.../statement_level_load_balance.data              |  39 +++
src/test/extended-query-test/test.sh               | 261 +++++++++++++++------
.../tests_n3/statement_level_load_balance.data     |  27 +++
src/test/regression/tests/001.load_balance/test.sh |  23 ++
src/utils/pool_process_reporting.c                 |   5 +
21 files changed, 454 insertions(+), 111 deletions(-)



More information about the pgpool-committers mailing list