[pgpool-general: 5741] Re: pgpool detected difference of the number of inserted, updated, or deleted tuples. - but there is none?

Tatsuo Ishii ishii at sraoss.co.jp
Thu Sep 21 22:50:07 JST 2017


BTW, is there any reason to use the native replication mode, rather
than streaming replication mode with Pgpool-II?  Recent PostgreSQL
supports "remote_apply" mode, which is truly synchronous replication.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Pgpool-II does not suppprt multi statements like "INSERT...; DELETE".
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> 
>> sorry to bother you again in such a short time. But as I have written in
>> "[pgpool-general: 5729] Re: pgpool says its degenerating a backend, but
>> it does not..." we have some problems with pgpool saying db nodes are
>> not in sync. I could not find any problems in our code, so I wrote a
>> little shell script to demonstrate the issue. It uses psql to send
>> request in parallel  to pgpool with 2 connected db nodes:
>> 
>> 
>> /#!/bin/bash//
>> //
>> //NUMBER_OF_PROCESSES=2//
>> //TEST_COUNT=4//
>> //
>> //function testDb()//
>> //{//
>> //        for i in $(seq 1 $(($TEST_COUNT/$NUMBER_OF_PROCESSES)))//
>> //        do//
>> //                echo "$1: $i"//
>> //                psql -U postgres -p 5433 test -c "DELETE FROM test;
>> INSERT INTO test VALUES ($RANDOM);"//
>> 
>> //#               psql -U postgres -p 5433 test -c "INSERT INTO test
>> VALUES ($RANDOM); DELETE FROM test;"//
>> 
>> //#               psql -U postgres -p 5433 test -c "DELETE FROM test;"//
>> //#               psql -U postgres -p 5433 test -c "INSERT INTO test
>> VALUES ($RANDOM);"//
>> //        done//
>> //}//
>> //
>> //for i in $(seq 1 $NUMBER_OF_PROCESSES)//
>> //do//
>> //        testDb $i &//
>> //done//
>> //
>> //wait//
>> //
>> //echo $(($TEST_COUNT/$NUMBER_OF_PROCESSES*$NUMBER_OF_PROCESSES))
>> entries tested./
>> 
>> 
>> Output is always something like this:
>> 
>> /# ./testDb.sh//
>> //2: 1//
>> //1: 1//
>> //INSERT 0 1//
>> //2: 2//
>> //ERROR:  pgpool detected difference of the number of inserted, updated
>> or deleted tuples. Possible last query was: "DELETE FROM test; INSERT
>> INTO test VALUES (3469);"//
>> //HINT:  check data consistency between master and other db node//
>> //ERROR:  pgpool detected difference of the number of inserted, updated
>> or deleted tuples. Possible last query was: "DELETE FROM test; INSERT
>> INTO test VALUES (3469);"//
>> //HINT:  check data consistency between master and other db node//
>> //1: 2//
>> //INSERT 0 1//
>> //ERROR:  pgpool detected difference of the number of inserted, updated
>> or deleted tuples. Possible last query was: "DELETE FROM test; INSERT
>> INTO test VALUES (21477);"//
>> //HINT:  check data consistency between master and other db node//
>> //ERROR:  pgpool detected difference of the number of inserted, updated
>> or deleted tuples. Possible last query was: "DELETE FROM test; INSERT
>> INTO test VALUES (21477);"//
>> //HINT:  check data consistency between master and other db node//
>> //4 entries tested./
>> 
>> 
>> If I check manually after the script was running, all nodes have the
>> same table content. Also if I use one of the other (commented out)
>> variants in the script, everything works fine.
>> What is the problem here?
>> 
>> 
>> Thanks in advance
>> Benjamin Firl
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general


More information about the pgpool-general mailing list