[Pgpool-general] Replication failover problem

Tatsuo Ishii ishii at sraoss.co.jp
Wed Oct 20 00:24:30 UTC 2010


Thanks for the report.

It appears that you hit a corner case bug: if the number of updated
tuples at a victim node(to-be-degerated-node, in this case sd3db2) is
0, no failover event happens. Included patches should fix the problem.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

>  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)
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pool_proto_modules.c.patch
Type: text/x-patch
Size: 1523 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20101020/2a0b3046/attachment.bin>


More information about the Pgpool-general mailing list