[pgpool-general: 2752] Re: pgpool builtin watchdog and order of the backend nodes

Attila Heidrich attila.heidrich at gmail.com
Fri Apr 11 15:32:43 JST 2014


Not exactly.

Two Linux boxes, both with pgpool and postgresql. Pools use watchdog and
"virtual IP" for HA, the two postgresql servers are the backend.

I don't think it is good for anything, but let's try:

              /->pg-1(pool:5432)---+---+--pg:5433
Virt-IP --+                               X
              \->pg-2(pool:5432)---+---+--pg:5433

Is there really something strange? It looks quite straightforward for me.

Anyway, specifying localhost and other server didn't work, I now use
"myhostname", "otherhostname" for the two backends, on both pool members.
Seems to work, do the replication.
Still there's that if I use pcp, I get the backends in different order on
both pool members. Still do not really understand, why pool members in a HA
configuration doesn't share the backend configuration.

I have just discovered a weekness of our configuration (two identical
servers replicating): If I have any problem other than a hardware issue, I
will very probably have this on both.

Regards,

Attila


2014-04-11 1:09 GMT+02:00 Tatsuo Ishii <ishii at postgresql.org>:

> [Back to to mailing list]
> Please reply to the mailing list, rather than me...
>
> If my understanding is correct, this looks like a "cascade" and
> "circular" configuration.
>
>             +--------------------+
>             |                    |
>             |                    v
> postgres-1--+->postgres-2--+->PostgreSQL
> ^                          |
> |                          |
> +--------------------------+
>
> What's the point of the configuration?
>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>
> > It's very easy, the relevant part is here:
> >
> > node postgres-2:
> > -----------------------
> > backend_hostname0 = 'localhost'
> > backend_port0 = 5433
> > backend_weight0 = 1
> > backend_data_directory0 = '/var/lib/postgresql/9.3'
> > backend_flag0 = 'ALLOW_TO_FAILOVER'
> >
> >
> > backend_hostname1 = 'postgres-1'
> > backend_port1 = 5433
> > backend_weight1 = 1
> > backend_data_directory1 = '/var/lib/postgresql/9.3'
> > backend_flag1 = 'ALLOW_TO_FAILOVER'
> >
> > node postgres-1:
> > -----------------------
> > backend_hostname0 = 'localhost'
> > backend_port0 = 5433
> > backend_weight0 = 1
> > backend_data_directory0 = '/var/lib/postgresql/9.3'
> > backend_flag0 = 'ALLOW_TO_FAILOVER'
> >
> >
> > backend_hostname1 = 'postgres-2'
> > backend_port1 = 5433
> > backend_weight1 = 1
> > backend_data_directory1 = '/var/lib/postgresql/9.3'
> > backend_flag1 = 'ALLOW_TO_FAILOVER'
> >
> >
> >
> > 2014-04-04 1:10 GMT+02:00 Tatsuo Ishii <ishii at postgresql.org>:
> >
> >> I'm a little bit confused. Can you show your pgpool.conf?
> >>
> >> Best regards,
> >> --
> >> Tatsuo Ishii
> >> SRA OSS, Inc. Japan
> >> English: http://www.sraoss.co.jp/index_en.php
> >> Japanese: http://www.sraoss.co.jp
> >>
> >> > Hi!
> >> >
> >> > Just a simple question:
> >> >
> >> > Is the order of the nodes important for the pgpool cluster-members?
> >> > I guess the answer is no, since only one pool member will be active at
> >> any
> >> > time, the only important is to enumerate all the backends for all the
> >> pool
> >> > members...
> >> >
> >> > But still I would like to know.
> >> >
> >> > Currently I use localhost as backend0 for all the nodes, and enumerate
> >> all
> >> > other backends in some order starting from backend1.
> >> > The configs are generated from data tables (called pillars) by
> saltstack,
> >> > currently I do not specify any order.
> >> >
> >> > The only strange thing is, that running pcp_node_info gives different
> >> > result for the same node number on all members.
> >> >
> >> > Regards,
> >> > Attila
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20140411/44ed0b79/attachment.html>


More information about the pgpool-general mailing list