[pgpool-general: 6304] Re: PGPool does not balance between slaves

Tatsuo Ishii ishii at sraoss.co.jp
Thu Nov 22 10:31:24 JST 2018


Probably status of PostgreSQL servers are out of sync with what
Pgpool-II recognizes. Stop Pgpool-II and remove "pgpool_status" file,
which should be located under "logdir" directory specified in
pgpool.conf. Then start Pgpool-II again. The pgpool_status file is
automatically re-created upon starting up.

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

> Hello Guys.
> 
> I have a pgpool  with five postgresql servers, one master and three slaves
> in mode sync.
> I chose streaming replication mode of pgpool based on file
> $prefix/etc/pgpool.conf.sample-stream.
> But when i execute on psql show pool_nodes i have this result
> 
> 
> postgres=# show pool_nodes;
>  node_id |  hostname   | port | status | lb_weight |  role   | select_cnt |
> load_balance_node | replication_delay
> ---------+-------------+------+--------+-----------+---------+------------+-------------------+-------------------
>  0       | 10.0.58.124 | 5432 | up     | 0.250000  | primary | 0          |
> true              | 0
>  1       | 10.0.58.123 | 5433 | down   | 0.250000  | standby | 0          |
> false             | 0
>  2       | 10.0.58.130 | 5433 | unused | 0.250000  | standby | 0          |
> false             | 0
>  3       | 10.0.58.132 | 5433 | unused | 0.250000  | standby | 0          |
> false             | 0
> (4 registros)
> 
> 
> Then i maked a shell script for for mass execution of querys, but executed
> on the master only (node_id 0).
> 
> 
> relevant parts of the configuration
> ----------------------------------------------------------------
> backend_hostname0 = '10.0.58.124'
> backend_port0 = 5432
> backend_weight0 = 1
> backend_data_directory0 = '/storage1/data'
> backend_flag0 = 'ALWAYS_MASTER'
> 
> backend_hostname1 = '10.0.58.123'
> backend_port1 = 5433
> backend_weight1 = 1
> backend_data_directory1 = '/storage1/data'
> backend_flag1 = 'ALLOW_TO_FAILOVER'
> 
> backend_hostname2 = '10.0.58.130'
> backend_port2 = 5433
> backend_weight2 = 1
> backend_data_directory2 = '/storage1/data'
> backend_flag2 = 'ALLOW_TO_FAILOVER'
> 
> backend_hostname3 = '10.0.58.132'
> backend_port3 = 5433
> backend_weight3 = 1
> backend_data_directory3 = '/storage1/data'
> backend_flag3 = 'ALLOW_TO_FAILOVER'
> 
> load_balance_mode = on
> master_slave_mode = on
> master_slave_sub_mode = 'stream'
> ----------------------------------------------------------------
> 
> 
> Any Tips ?
> 
> 
> -- 
> foobar


More information about the pgpool-general mailing list