<html><head></head><body><div class="ydpf86762c9yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>For some reason the status is unused, it should be up or down.</div><div><br></div><div>I think you should stop pgpool, remove the file /tmp/pgpool_status, then restart pgpool. The file /tmp/pgpool_status is used by pgpool to record the status of the node. When the file is not there it will create it at startup</div><div><br></div><div>Regards,&nbsp;</div><div><br></div><div class="ydpf86762c9signature">Pierre</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="ydp9079828fyahoo_quoted_3246817989" class="ydp9079828fyahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, March 14, 2019, 7:32:04 PM GMT+1, Fernando Luizão &lt;fernandoluizao@gmail.com&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydp9079828fyiv3262507976"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I'm new to pgpool, and I'm trying to use the load balancer.&nbsp;</div><div>I have a primary and a hot standby, using native streaming replication.</div><div><br></div><div><div>Versions:&nbsp;</div><div>postgresql -&nbsp;11.2</div><div>pgpool -&nbsp;4.0.2</div><div><br></div></div><div>Here's what I changed in pgpool.conf:</div><div><br></div><div><div>listen_addresses = '*'</div><div>port = 5432</div><div><br></div><div>backend_hostname0 = '192.168.51.186'</div><div>backend_port0 = 5433</div><div>backend_weight0 = 0.4</div><div>backend_data_directory0 = '/var/lib/postgresql/11/main'</div><div>backend_flag0 = 'ALWAYS_MASTER'</div><div><br></div><div>backend_hostname1 = '192.168.51.185'</div><div>backend_port1 = 5433</div><div>backend_weight1 = 0.6</div><div>backend_data_directory1 = '/var/lib/postgresql/11/main'</div><div><br></div><div>load_balance_mode = on</div><div><br></div><div>master_slave_mode = on</div><div>master_slave_sub_mode = 'stream'</div></div><div><br></div><div>However, when I inspect the nodes on pgpool, I get the following:</div><div><br></div><div><div>postgres=# show pool_nodes;</div><div>&nbsp;node_id |&nbsp; &nbsp; hostname&nbsp; &nbsp; | port | status | lb_weight |&nbsp; role&nbsp; &nbsp;| select_cnt | load_balance_node | replication_delay | last_status_change&nbsp;&nbsp;</div><div>---------+----------------+------+--------+-----------+---------+------------+-------------------+-------------------+---------------------</div><div>&nbsp;0&nbsp; &nbsp; &nbsp; &nbsp;| 192.168.51.186 | 5433 | up&nbsp; &nbsp; &nbsp;| 0.400000&nbsp; | primary | 6113&nbsp; &nbsp; &nbsp; &nbsp;| true&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| 2019-03-14 11:39:15</div><div>&nbsp;1&nbsp; &nbsp; &nbsp; &nbsp;| 192.168.51.185 | 5433 | unused | 0.600000&nbsp; | standby | 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | false&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| 2019-03-14 11:39:15</div></div><div><br></div><div>All queries are being redirected to primary. I can query the standby directly, so everything seems fine with my replication setup.</div><div><br></div><div>Why it says the standby is unused? I'm missing something in the configuration?</div><div><br></div><div>Thanks,<br></div><div>Fernando</div></div></div></div></div></div></div>_______________________________________________<br>pgpool-general mailing list<br><a href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br><a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br></div>
            </div>
        </div></body></html>