<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Tatsuo,</div><div class="gmail_default" style="font-size:small">thank you for your clarification, <span lang="en"><span><span>I lost sight of the fact that the pgpool cluster is working as a Proxy in front of PostgreSQL.</span></span></span></div><div class="gmail_default" style="font-size:small"><span lang="en"><span><span><br></span></span></span></div><div class="gmail_default" style="font-size:small"><span lang="en"><span><span>Regards,</span></span></span></div><div class="gmail_default" style="font-size:small"><span lang="en"><span><span>Luca</span></span></span></div><div class="gmail_default" style="font-size:small"><span lang="en"><span><span><br></span></span></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 8, 2021 at 9:06 AM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> 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">> Hi all,<br>
> <br>
> we setup a 3 nodes cluster with PGPool-II version 4.2.3 like described here:<br>
> <br>
> <a href="https://www.pgpool.net/docs/latest/en/html/example-cluster.html" rel="noreferrer" target="_blank">https://www.pgpool.net/docs/latest/en/html/example-cluster.html</a><br>
> <br>
> Tonight the primary node failed for network problems and failover occurred,<br>
> BUT we found that the Virtual IP was moved not on the new Primary Postsgres<br>
> but on the Standby one.<br>
> <br>
> Since the Virtual IP is used for client connections to the Writable<br>
> Postgres, the clients were actually connecting to a Read-Only instance.<br>
> <br>
> Shouldn't the Virutal IP get migrated ONLY on the node that has Primary<br>
> Role?<br>
<br>
No. You misunderstand what the VIP is assigned to. The VIP is assigned<br>
to the primary Pgpool-II, not to the primary PostgreSQL server.  In<br>
any case your clients can send write query to the VIP.  Pgpool-II<br>
recognizes which instance of PotgreSQL is the primary server and sends<br>
the write query to the PostgreSQL primary server.<br>
<br>
You can check which PostgreSQL instance is the primary PostgreSQL by<br>
using "show pool_nodes" command.<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div>