[Pgpool-general] Cannot trigger out-of-sync

Ger Apeldoorn ger.apeldoorn at sara.nl
Thu Jan 14 07:55:48 UTC 2010


Hi,

I want to trigger an out-of-sync for a pgpool cluster in our 
test-environment, but am unable to do it.

As I understood it, if pgpools get a different number of rows back from 
a query, it should trigger an out of sync for one of the databases.

This is what I did:
1) Insert new record directly in the local postgres database:
psql -p5433 my_database -c "insert into users (id, name, description, 
password, field) values (10000,'gap','Ger','hihaho', 1);"

2) Update this record through PGPool:
psql -p9999 my_database -c "update users set name = 'Harry' where id = 
10000;"

This generates the following error:
ERROR:  pgpool detected difference of the number of inserted, updated or 
deleted tuples. Possible last query was: "update users set name = 
'Harry' where id = 10000;"
HINT:  check data consistency between master and other db node

Unfortunately, no out-of-sync status is being set:
[root at db3 ~]# pcp_node_info 30 node1 9898 pgpool fake_password 1
node2 5433 2 1073741823.500000
[root at node2 ~]# pcp_node_info 30 node1 9898 pgpool fake_password 0
node1 5433 2 1073741823.500000

How can this be? Is there another (better) way to trigger a failure?

Thanks again,
Ger.





More information about the Pgpool-general mailing list