[Pgpool-general] Replication failover problem

Gary Fu gfu at sigmaspace.com
Tue Oct 19 19:16:09 UTC 2010


  Hi Tatsuo,

I'm running pgpool2 version 3.0 and have the following setup:
   replication_stop_on_mismatch = true
   failover_if_affected_tuples_mismatch = true
   replicate_select = false

However, from the following example, I'm not sure why there is no 
failover happen when the update sql fails due to the updated tuples are 
not match.  There is only 1 record in sd3db1 and 0 record in sd3db2.

After tested again, I noticed that it (failover) works when there are 2 
records in db1 and 1 record in db2.  It looks like to me the failover is 
not working when there has 0 record in the db2 for the update sql.

Any idea ?

Thanks,
Gary


[sd3uat1.uat1_admin].gfu> show pool_nodes;
  hostname | port | status | lb_weight
----------+------+--------+-----------
  sd3db1   | 5432 | 2      | 0.500000
  sd3db2   | 5432 | 2      | 0.500000
(2 rows)

[sd3uat1.uat1_admin].gfu> select * from tmp;
  id
----
  10
(1 row)

[sd3uat1.uat1_admin].gfu> update tmp set id=11;
ERROR:  pgpool detected difference of the number of inserted, updated or 
deleted tuples. Possible last query was: "update tmp set id=11;"
HINT:  check data consistency between master and other db node
server closed the connection unexpectedly
         This probably means the server terminated abnormally
         before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
[sd3uat1.uat1_admin].gfu> select * from tmp;
  id
----
  10
(1 row)

[sd3uat1.uat1_admin].gfu> show pool_nodes;
  hostname | port | status | lb_weight
----------+------+--------+-----------
  sd3db1   | 5432 | 2      | 0.500000
  sd3db2   | 5432 | 2      | 0.500000
(2 rows)




More information about the Pgpool-general mailing list