<div dir="ltr"><div>Hi, </div><div><br></div><div>Our pgpool2 configuration uses load_balancing with two upstream nodes. The two nodes are configured to using streaming replication. All seems work well. I also tried to insert some data in my application which is using the pgpool and it works just fine.</div>

<div><br></div><div>However, when I use psql to connect to pgpool2 and issue &quot;show pool_nodes&quot;, it tells me both nodes are standby.</div><div><br></div><div><div>ubuntu=&gt;show pool_nodes;</div><div> node_id |  hostname  | port | status | lb_weight |  role   </div>

<div>---------+------------+------+--------+-----------+---------</div><div> 0       | 10.0.2.46  | 5432 | 2      | 0.500000  | standby</div><div> 1       | 10.0.1.248 | 5432 | 2      | 0.500000  | standby</div><div>(2 rows)</div>

</div><div><br></div><div>It puzzled me a lot. I&#39;m expecting one should be the master (or primary?).</div><div><br></div><div>The key fields of my pgpool.conf are shown below</div><div>...</div><div><div>master_slave_mode = on</div>

</div><div><div>master_slave_sub_mode = &#39;stream&#39;</div></div><div>load_balance_mode = on<br></div><div>parallel_mode = off<br></div><div>replication_mode = off<br></div><div>...</div><div><br></div><div><br></div>
<div>
I also run select pg_is_in_recovery() on both upperstream nodes. They correctly return t on the master node and f on the slave node.</div><div><br></div><div>On slave node:</div><div> </div><div><div>caboodl@ip-10-0-1-248:~$ psql</div>

<div>psql (9.1.10)</div><div>Type &quot;help&quot; for help.</div><div><br></div><div>ubuntu=&gt; select pg_is_in_recovery();</div><div> pg_is_in_recovery </div><div>-------------------</div><div> t</div><div>(1 row)</div>

</div><div><br></div><div><br></div><div>On master node:</div><div><br></div><div><div>ubuntu@ip-10-0-2-46:~$ psql</div><div>psql (9.1.10)</div><div>Type &quot;help&quot; for help.</div><div>caboodl=&gt; select pg_is_in_recovery();<br>

</div><div> pg_is_in_recovery </div><div>-------------------</div><div> f</div><div>(1 row)</div></div><div><br></div><div><br></div><div>BTW. Is slave equals to standby and master equals to primary in the terminology of pgpool2?</div>

<div><br></div><br clear="all"><div><div dir="ltr"><br>Regards,<br><br>Weikai (Victor)  Xie</div></div>
</div>