[pgpool-general: 7266] Re: Keep old master after attach down node 0
Tatsuo Ishii
ishii at sraoss.co.jp
Tue Sep 8 21:44:01 JST 2020
> Hello,
>
> I have one pgpool in native replication mode connect to 2 postgres.
>
> The initial configuration is:
>
> node_id | hostname | port | status | lb_weight | role |
> ---------+-------------------+------+--------+-----------+--------+
> 0 | postgis | 5432 | up | 0.666667 | master |
> 1 | postgis-replicate | 5432 | up | 0.333333 | slave |
>
>
>
>
>
>
> Step 1 --> detach node 0
>
> node_id | hostname | port | status | lb_weight | role |
> ---------+-------------------+------+--------+-----------+--------+
> 0 | postgis | 5432 | down | 0.666667 | slave |
> 1 | postgis-replicate | 5432 | up | 0.333333 | master |
>
>
> Step 2 --> attach node 0
>
> node_id | hostname | port | status | lb_weight | role |
> ---------+-------------------+------+--------+-----------+--------+
> 0 | postgis | 5432 | up | 0.666667 | master |
> 1 | postgis-replicate | 5432 | up | 0.333333 | slave |
>
>
>
>
> The node 0 get's promoted after attach.
> I was expecting the node 1 to remain as master.
> Is there a way around this behavior ?
No. By definition "master" is the node that has the youngest node id
in the live nodes. By the way do you want node 1 remaining master
after step 2?
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp.
More information about the pgpool-general
mailing list