<p> </p>
<p>Yes I want node 1 remaining master after step 2.<br />Because I have custom method for resync DB after one node is detached and pgpool has no access to postgres through SSH.</p>
<p>During synchronization, client connections are not disconnected.</p>
<p> </p>
<p>Kind regards</p>
<blockquote style="padding-left: 5px; margin-left: 5px; border-left: #ff0000 2px solid;">&gt; Message du 08/09/20 14:44<br />&gt; De : "Tatsuo Ishii" &lt;ishii@sraoss.co.jp&gt;<br />&gt; A : francois_dode@orange.fr<br />&gt; Copie à : pgpool-general@pgpool.net<br />&gt; Objet : [pgpool-general: 7266] Re: Keep old master after attach down node 0<br />&gt; <br />&gt; &gt; Hello,<br />&gt; &gt; <br />&gt; &gt; I have one pgpool in native replication mode connect to 2 postgres.<br />&gt; &gt; <br />&gt; &gt; The initial configuration is:<br />&gt; &gt; <br />&gt; &gt;  node_id |     hostname      | port | status | lb_weight |  role  |<br />&gt; &gt; ---------+-------------------+------+--------+-----------+--------+<br />&gt; &gt;  0       | postgis           | 5432 | up     | 0.666667  | master |<br />&gt; &gt;  1       | postgis-replicate | 5432 | up     | 0.333333  | slave  |<br />&gt; &gt; <br />&gt; &gt; <br />&gt; &gt; <br />&gt; &gt;  <br />&gt; &gt; <br />&gt; &gt; <br />&gt; &gt; Step 1 --&gt; detach node 0<br />&gt; &gt; <br />&gt; &gt;  node_id |     hostname      | port | status | lb_weight |  role  |<br />&gt; &gt; ---------+-------------------+------+--------+-----------+--------+<br />&gt; &gt;  0       | postgis           | 5432 | down     | 0.666667  | slave |<br />&gt; &gt;  1       | postgis-replicate | 5432 | up     | 0.333333  | master |<br />&gt; &gt; <br />&gt; &gt; <br />&gt; &gt; Step 2 --&gt; attach node 0<br />&gt; &gt; <br />&gt; &gt;  node_id |     hostname      | port | status | lb_weight |  role  |<br />&gt; &gt; ---------+-------------------+------+--------+-----------+--------+<br />&gt; &gt;  0       | postgis           | 5432 | up     | 0.666667  | master |<br />&gt; &gt;  1       | postgis-replicate | 5432 | up     | 0.333333  | slave |<br />&gt; &gt; <br />&gt; &gt; <br />&gt; &gt; <br />&gt; &gt; <br />&gt; &gt; The node 0 get's promoted after attach.<br />&gt; &gt; I was expecting the node 1 to remain as master.<br />&gt; &gt; Is there a way around this behavior ?<br />&gt; <br />&gt; No. By definition "master" is the node that has the youngest node id<br />&gt; in the live nodes. By the way do you want node 1 remaining master<br />&gt; after step 2?<br />&gt; <br />&gt; Best regards,<br />&gt; --<br />&gt; Tatsuo Ishii<br />&gt; SRA OSS, Inc. Japan<br />&gt; English: http://www.sraoss.co.jp/index_en.php<br />&gt; Japanese:http://www.sraoss.co.jp.<br />&gt; _______________________________________________<br />&gt; pgpool-general mailing list<br />&gt; pgpool-general@pgpool.net<br />&gt; http://www.pgpool.net/mailman/listinfo/pgpool-general<br />&gt; </blockquote>