[pgpool-general: 5443] what does "load_balance_node" mean in pool_nodes?

PVY balroga3 at yandex.ru
Sat May 6 15:44:27 JST 2017


Hello.

I  have  a  single  pgpool  with two postgresql servers in master/slave
streaming replication.

I  don't  want  pgpool  to  do any kind of failover actions, just load
balancing of requests.
Pgpool  detects  both  pgsql  servers  and  their  roles  correctly on
startup.

I can't understand what is the meaning of "load_balance_node" value in
the output of show pool_nodes?

node_id | hostname     | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay
 0      | pgsql-slave  | 5432 | up     | 0.666667  | standby | 3483       | true              | 0
 1      | pgsql-master | 5432 | up     | 0.333333  | primary | 1811       | false             | 0

Why slave is "true" and master is "false"? 
Sometimes if I restart pgpool I get the opposite values:

node_id | hostname     | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay
 0      | pgsql-slave  | 5432 | up     | 0.666667  | standby | 409339     | false             | 0
 1      | pgsql-master | 5432 | up     | 0.333333  | primary | 323627     | true              | 0

This is my config:

backend_hostname0 = 'pgsql-slave'
backend_port0 = 5432
backend_weight0 = 2
backend_flag0 = 'DISALLOW_TO_FAILOVER'

backend_hostname1 = 'pgsql-master'
backend_port1 = 5432
backend_weight1 = 1
backend_flag1 = 'DISALLOW_TO_FAILOVER'

replication_mode = off
load_balance_mode = on
master_slave_mode = on
master_slave_sub_mode = 'stream'
sr_check_period = 0
sr_check_user = 'username'
sr_check_password = 'password'
sr_check_database = 'db'
delay_threshold = 0


Thank you.

-- 
 Pavel



More information about the pgpool-general mailing list