[pgpool-general: 2163] Re: pgpool is taking wrong node for a master

Armin Nesiren armin.nesiren at intera.si
Thu Sep 26 16:53:05 JST 2013


Thank you very much for answer.


On Wed, Sep 25, 2013 at 3:10 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:

> > Hello,
> >
> > i have a little problem, or scenario that is happening and that I want to
> > avoid.
> >
> > Here is scenario:
> >
> > I have two nodes named node1, and node2. node1 is primary, node2 is
> standby.
> >
> > - node1 fails
> > - pgpool promote node2 to primary
>
> Apparently you restart node1 at this point.
>
> > - i restart pgpool service for whatever reason
> > - pgpool is taking old primary (node1),to be primary again, even last
> state
> > was that node2 is primary
> > - pgpool is working with node1 as primary for some time, with old data
> >
> >
> > After this,it is hard to check which node have newer data, and its hart
> not
> > to lose one piece of data.
> >
> > How it is possible that pgpool take node1 as primary even if last state
> was
> > that node2 was primary?
>
> Because you restart node1 before restarting pgpool-II. Pgpool-II
> checks nodes one by one according to the order that they are written
> in pgpool.conf. Since pgpool-II finds that node1 is the primary, it
> assumes node1 is the primary. This could happen of if you restart
> pgpool-II with -D option, pgpool-II forgets previous node status.
>
> > What is the best practice for this kind of situation?
>
> Retart pgpool-II without -D option. Pgpool will remember that node1
> was down before and avoid to choose node1 as the primary.
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>



-- 
Armin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20130926/23452dc1/attachment.html>


More information about the pgpool-general mailing list