[pgpool-committers: 1941] pgpool: Avoid to send queries to unrelated nodes in streaming replicati
Muhammad Usama
m.usama at gmail.com
Wed May 7 20:27:28 JST 2014
Avoid to send queries to unrelated nodes in streaming replication mode.
Pgpool-II sends certain queries, such as BEGIN, END and SET commands to
all of DB nodes. However in streaming replication mode, only primary
node and at most one standby node are only concerned (if primacy node
is selected as the load balance node, only 1 node is concerned).
Think about 3 nodes cluster. Node 0 is primary, node 1 and 2 are
standby servers. Node 1 is selected as the load balance node. In this
case no query is needed to be sent to node 2, because DMLs are sent to
node 0 while SELECTs are sent to node 1.
For this purpose pool_setall_node_to_be_sent() is modified to only set
related nodes on the where_to_send node map. See [pgpool-hackers: 464]
for more details.
Branches
--------
EXCEPTION_MGR
master
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=83c84034b844864ff3760de192ee9bc3d545ab5a
Author: Tatsuo Ishii <ishii at postgresql.org>
Modified Files
--------------
src/context/pool_query_context.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
More information about the pgpool-committers
mailing list