[pgpool-general: 4280] Re: Is Master/Slave promotion supported or not?

Tatsuo Ishii ishii at postgresql.org
Sun Jan 3 19:48:58 JST 2016


> Hi all. I am slightly confused. I seem to have read two relatively recent,
> but possibly contradictory statements on master/slave (using SR) promotion
> using pgpool.
> 
> The first at [1] states "pcp_promote_node just changes the status in
> pgpool-II and does nothing with PostgreSQL server side."
> 
> The second at [2] states "HOW TO PROMOTE THE SLAVE. This will happen
> automatically with pgpool. The manual process is described here for good
> measure but we should not have to use it."
> 
> On one hand in [1] I am reading that only *within* PGPool do you see the
> master/slave promotion happening (which is indeed something i see when i
> run show pool_nodes) with no promotion of the actual Postgres slave.
> 
> However the blog at [2] suggests it all happens as part of the PGPool
> process and your Postgres Slave will become the new Master automatically
> (although to put back the original master is clearly a manual process).
> 
> Can someone clear this up please :-) I really just want the Slave to become
> the new Master and PGPool knows this but the backend servers don't and I'm
> slightly at a loss as how to tell them. Maybe I am missing a config setting.

Probably what you want actually includes two things:

1) Promote one of slaves

2) Let the downed master (old master) become a new slave following the
   new master (that was promoted in #1)

For #1, create a "failover script".
See http://www.pgpool.net/pgpool-web/contrib_docs/simple_sr_setting2_3.3/index.html
for an example.

For #2, you really ought to think it should happen automatically or
not. If the cause that old master went down was a hardware failure,
you have to fix it first. In this case automated process is impossible
or dangerous. If you are sure it should happen automatically, you
could create your own "follow master command".

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Much Appreciated,
> steven
> 
> [1] http://www.sraoss.jp/pipermail/pgpool-general/2015-January/003464.html
> 
> [2] http://www.accustack.com/postgresql-replication-pgpool-ii/


More information about the pgpool-general mailing list