[pgpool-general: 7267] Re: Keep old master after attach down node 0

François francois_dode at orange.fr
Wed Sep 9 01:38:42 JST 2020


 

Yes I want node 1 remaining master after step 2.
Because I have custom method for resync DB after one node is detached and pgpool has no access to postgres through SSH.

During synchronization, client connections are not disconnected.

 

Kind regards

> Message du 08/09/20 14:44
> De : "Tatsuo Ishii" 
> A : francois_dode at orange.fr
> Copie à : pgpool-general at pgpool.net
> Objet : [pgpool-general: 7266] Re: Keep old master after attach down node 0
> 
> > 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.
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20200908/3a9b92cd/attachment.html>


More information about the pgpool-general mailing list