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

Tatsuo Ishii ishii at sraoss.co.jp
Sun May 7 10:44:07 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

Paval,

Pgpool-II chooses one of DB nodes with a probability of the weight
parameter when a client connects to Pgpool-II. "load_balance_node" is
true if it is chosen, and false if it is not chosen. The decision is
not relevant whether it is a master or a slave.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list