<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks, now the standby is up.<div><br></div><div>But I&#39;m not sure if I understand the balancing rules.</div><div><br></div><div>What I would like is for the consultations to be divided more evenly.<br></div><div>I tried to test the load balancing by opening several psql&#39;s on my local machine and doing queries on each of them, but it looks like the queries are always being routed to the standby now ...<br></div><div><br></div><div>The docs says:</div><div><br></div><div>To which node the load balancing mechanism sends read queries is decided at the session start time and will not be changed until the session ends.<br></div><div><br></div><div>Does this mean that every query will be directed to the same node, until there is a write operation, on connection basis?<br></div><div><br></div><div>Thanks,</div><div>Fernando</div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 14, 2019 at 3:36 PM Pierre Timmermans &lt;<a href="mailto:ptim007@yahoo.com">ptim007@yahoo.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_8381391662156465538ydpf86762c9yahoo-style-wrap" style="font-family:&quot;Helvetica Neue&quot;,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, </div><div><br></div><div class="gmail-m_8381391662156465538ydpf86762c9signature">Pierre</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="gmail-m_8381391662156465538ydp9079828fyahoo_quoted_3246817989" class="gmail-m_8381391662156465538ydp9079828fyahoo_quoted">
            <div style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Thursday, March 14, 2019, 7:32:04 PM GMT+1, Fernando Luizão &lt;<a href="mailto:fernandoluizao@gmail.com" target="_blank">fernandoluizao@gmail.com</a>&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="gmail-m_8381391662156465538ydp9079828fyiv3262507976"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I&#39;m new to pgpool, and I&#39;m trying to use the load balancer. </div><div>I have a primary and a hot standby, using native streaming replication.</div><div><br></div><div><div>Versions: </div><div>postgresql - 11.2</div><div>pgpool - 4.0.2</div><div><br></div></div><div>Here&#39;s what I changed in pgpool.conf:</div><div><br></div><div><div>listen_addresses = &#39;*&#39;</div><div>port = 5432</div><div><br></div><div>backend_hostname0 = &#39;192.168.51.186&#39;</div><div>backend_port0 = 5433</div><div>backend_weight0 = 0.4</div><div>backend_data_directory0 = &#39;/var/lib/postgresql/11/main&#39;</div><div>backend_flag0 = &#39;ALWAYS_MASTER&#39;</div><div><br></div><div>backend_hostname1 = &#39;192.168.51.185&#39;</div><div>backend_port1 = 5433</div><div>backend_weight1 = 0.6</div><div>backend_data_directory1 = &#39;/var/lib/postgresql/11/main&#39;</div><div><br></div><div>load_balance_mode = on</div><div><br></div><div>master_slave_mode = on</div><div>master_slave_sub_mode = &#39;stream&#39;</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> node_id |    hostname    | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay | last_status_change  </div><div>---------+----------------+------+--------+-----------+---------+------------+-------------------+-------------------+---------------------</div><div> 0       | 192.168.51.186 | 5433 | up     | 0.400000  | primary | 6113       | true              | 0                 | 2019-03-14 11:39:15</div><div> 1       | 192.168.51.185 | 5433 | unused | 0.600000  | standby | 0          | false             | 0                 | 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&#39;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></div></blockquote></div>