[pgpool-general: 3014] Re: Master backend ID
Tatsuo Ishii
ishii at postgresql.org
Wed Jul 9 08:11:12 JST 2014
> I am wondering, is there any mechanism which allow obtain information
> that backend is primary or not in master/slave configuration, using
> Stream replication?.
>
> I want to create universal failover script, to not modify him when
> replication direction change after failover.
> Failover script which is attached to documentation always assumes that
> primary node is 0.
To create universal failover script, actually you don't need to know
which is primary. "%d" is the failed node id and "%P" is the old
primary. So you could do something like:
if failed_node_id is equal to old_primary_node_id then
promote one of standby node.
endif
This could work for the primary node is not 0.
You can play with "pgpool_setup" script to create this type of cluster
configuration sample.
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