[pgpool-committers: 4777] pgpool: Add new feature to enable specifying SQL patterns lists that sh

Bo Peng pengbo at sraoss.co.jp
Thu Jun 14 14:32:29 JST 2018


Add new feature to enable specifying SQL patterns lists that should not be load-balanced.

Even though currently we can do this by adding the
/*NO LOAD BALANCE*/ comment to queries, this requires
modifying application codes and this is not always
possible.

This feature enables specifying SQL patterns lists
that should not be load-balanced.

-------------
New parameter
-------------
black_query_pattern_list = ''

You can specify a semicolon separated list of SQL patterns
that should be sent to primary node only.

SQL that matched patterns specified in this list are not load balanced.
Only Maste Slave mode is supported.

You can use regular expression to match SQL patterns,
to which ^ and $ are automatically added.
When using characters such as "'", ";" or "*" in SQL patterns,
you need to escape them using "\".

Branch
------
master

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

Modified Files
--------------
doc.ja/src/sgml/loadbalance.sgml                   |  94 +++++++++++++++++
doc/src/sgml/loadbalance.sgml                      |  65 ++++++++++++
src/config/pool_config.l                           |  31 +++++-
src/config/pool_config_variables.c                 | 111 ++++++++++++++++++++-
src/context/pool_query_context.c                   |  12 ++-
src/include/pool_config.h                          |   7 ++
src/sample/pgpool.conf.sample                      |   7 +-
src/sample/pgpool.conf.sample-logical              |   6 ++
src/sample/pgpool.conf.sample-master-slave         |   6 ++
src/sample/pgpool.conf.sample-replication          |   6 ++
src/sample/pgpool.conf.sample-stream               |   6 ++
src/test/regression/tests/001.load_balance/test.sh |  45 +++++++++
src/utils/pool_process_reporting.c                 |  13 +++
src/utils/pool_select_walker.c                     |   6 ++
14 files changed, 410 insertions(+), 5 deletions(-)



More information about the pgpool-committers mailing list