[pgpool-general: 2234] Re: Mistake with old master and new master
Yugo Nagata
nagata at sraoss.co.jp
Wed Nov 6 19:35:06 JST 2013
Hi,
On Tue, 5 Nov 2013 00:47:21 -0430
Lazaro Ruben Garcia Martinez <lgarciam at vnz.uci.cu> wrote:
> Hello everyone in the list:
>
> I have a mistake or a wrong knowledge about the meaning of old master and new master.
>
> I have two nodes, node A and node B, node A is standby and node B is primary:
>
> The pgpool.conf looks like this:
>
> backend_hostname0 = A
> backend_port0 = 5432
> backend_weight0 = 1
> backend_data_directory0 = '/opt/pgsql/data'
> backend_flag0 = 'ALLOW_TO_FAILOVER'
>
> backend_hostname1 = B
> backend_port1 = 5432
> backend_weight1 = 1
> backend_data_directory1 = '/opt/pgsql/data'
> backend_flag1 = 'ALLOW_TO_FAILOVER'
>
> When node B (primary) goes down the failover command is executed like this:
> failover_command = '/opt/pgpool/bin/failover_stream.sh %M %m %H'
>
> But in pgpool.log, old master node and new master node are the same:
>
> 2013-11-04 19:05:54 LOG: pid 15061: execute command: /opt/pgpool/bin/failover_stream.sh 0 0 A
>
> The question is:
>
> Why old master is 0 if node B is the node number 1 in pgpool.conf (backend_hostname1)?????
"master" is the alive node whose ID is youngest. In streaming replication mode,
the primary node is called "primary" not "master".
(http://www.pgpool.net/docs/latest/pgpool-en.html#BACKEND_HOSTNAME)
So, in avove setting, A is master and B is primary. When B goes down, master doesn't
change and primary changes from B to A.
Old master node ID (%M) : 0
New master node ID (%m) : 0
New master hostname (%H) : A
Old primary node ID (%P) : 1 <= this is ID of B
(http://www.pgpool.net/docs/latest/pgpool-en.html#FAILOVER_COMMAND)
>
> The pgpool version is 3.3.1.
>
> Is this a bug??
>
> Any help is appreciated.
> Regards.
>
> Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
> http://www.antiterroristas.cu
> http://justiciaparaloscinco.wordpress.com
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
--
Yugo Nagata <nagata at sraoss.co.jp>
More information about the pgpool-general
mailing list