[pgpool-general: 2038] SELECT sent to both nodes in replication mode
Rypl Lukas
rypl at marconi.ttc.cz
Thu Aug 15 18:42:15 JST 2013
Hello,
I would like to use pgpool 3.3.0 and postges 9.1 in replication mode
with queries send to master db, without parallel queries or load
balancing. Unfortunately the following settings still send queries to
both nodes:
replication_mode = on
replicate_select = off
load_balance_mode = off
master_slave_mode = off
parallel_mode = off
This is the log:
connection received: host=localhost port=53802
DB node id: 0 backend pid: 11864 statement: BEGIN
DB node id: 1 backend pid: 12508 statement: BEGIN
DB node id: 0 backend pid: 11864 statement: SELECT 1;
DB node id: 1 backend pid: 12508 statement: SELECT 1;
DB node id: 1 backend pid: 12508 statement: COMMIT
DB node id: 0 backend pid: 11864 statement: COMMIT
DB node id: 0 backend pid: 11864 statement: DISCARD ALL
DB node id: 1 backend pid: 12508 statement: DISCARD ALL
As a workaround, the following seems to work as expected:
load_balance_mode = on
backend_weight0 = 1
backend_weight1 = 0
connection received: host=localhost port=53930
DB node id: 0 backend pid: 12191 statement: SELECT 1;
DB node id: 0 backend pid: 12191 statement: DISCARD ALL
DB node id: 1 backend pid: 12752 statement: DISCARD ALL
It seems to be strange because based on table provided in description
of replicate_select on
http://www.pgpool.net/docs/latest/pgpool-en.html#replication_mode I
would expect that the first setting will send queries only to the master
node.
Can somebody help me to find out if there is some fault in my setup or
in pgpool?
Thanks and Regards,
Lukas Rypl
More information about the pgpool-general
mailing list