[pgpool-general: 283] Re: Feature Request … Master/Slave Mode Addition

Tatsuo Ishii ishii at postgresql.org
Fri Mar 23 07:57:42 JST 2012


> I essentially want a mode in PGPool where PGPool will monitor all of
> the DB servers and dynamically figure out which one is the master.
> It will do all of the normal healthchecks, and even catch it
> automatically when a new server is promoted to the master. Streaming
> replication healthchecks would still run as well, and update
> appropriately if the backend master changes.

First of all, it's pretty difficult to recognize which one is the
master. As far as I know, there's no reliable way to detect which one
is the master. If you know how to do it, please let me know. We do it
in hard way when failover starts but we don't want to it regulary
because it's so hard:-)

> Any time a single server
> goes down (thats not the master), it should stop sending transactions
> there but continue to accept them and distribute them among the other
> servers. When that backend server comes back online, it should be
> re-added to the pool immediately.

As explained many times the reason why we don't it automatically is,
we cannot trust the downed server. It may be right after initdb'ed or
it may have completely outdated contents. Who knows.

BTW, you could issue pcp_attach_node command from your PostgreSQL
starting script if you are sure the downed server's database is fine.

> This model also allows us to run two PGPool servers in parallel.. we
> can run one as a primary (that maybe has the failover commands all
> configured) and a second one as a backup with no failover commands
> configured... just there to accept connections if the first one goes
> offline!
--
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