> When doing a failover, shoudn't pgpool-II keep the new master as the > master from that point on? > > > >>From my experience, after the master database fails and the slave takes > over as master, if pcp_recovery_node is used to recover the old master, > pgpool-II is assumes the master is back (because pgpool seems to mainain > its master at backend0). I think pgpool should attach any other database > as an slave, therefore not assuming it is the master again if it's > backend0. > > > > I'm tempted to stop pgpool-II, change its configuration file to swap > backend values (backend0 with backend1 values and viceversa) and restart > pgpool. This way, pgpool would work as I expect, but of course it's a > hack. Is there a better idea around this? > > > > I'm using: pgpool-II 3.0.2 (CVS) and PostgreSQL 9.0.1, in a two-backend > configuration.
Next version of pgpool-II will be able to deal with the problem. pgpool-II will have info regarding which node is the primary. For example it will be able to deal with following situation: backend0: master: primary backend1: standby | primary goes down and standby promotes to primary | V backend0: master: down backend1: primary | backend0 recovered and becomes a standby | V backend0: master: standby backend1: primary | backend1 goes down and backend0 promotes to primary | V backend0: master: primary backend1: down | backend1 recovered and becomes a standby | V backend0: master: primary backend1: standby I have written a tutorial which can handle this kind of situation. Please take a look at: http://pgpool.projects.postgresql.org/contrib_docs/simple_sr_setting/index.html -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp _______________________________________________ Pgpool-general mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-general
