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

Benjamin Firl bf at wisit.com
Thu Sep 21 23:24:45 JST 2017


Ah ok, thank you, I did not know about "remote_apply".

My example uses multi statements, but our production code does not. So
the error there has to be something else, but now I am not able to
reproduce it in a small example ;)
Anyway, we worked around the problem for now and I will look into
PostreSQL replication feature.


Thanks for your time and kind regards
Benjamin Firl



On 09/21/2017 03:50 PM, Tatsuo Ishii wrote:
> 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

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++

+++ Jetzt neu Wissensmanagement für Netzwerke +++

+++             www.knodge.de                 +++

+++++++++++++++++++++++++++++++++++++++++++++++++

 

--

www.wisit.com

www.knodge.de

 

 

wisit media GmbH

Ehrenbergstr. 11

D-98693 Ilmenau

---------------------------------------------------------------------------

-

wisit media GmbH, Ehrenbergstr. 11, D-98693 Ilmenau

Registergericht Jena HRB 512472

Geschaeftsfuehrung: Dipl. Ing. Markus Duelli

 

 

Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich

erhalten haben, informieren Sie bitte sofort den Absender und vernichten

Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe

dieser E-Mail ist nicht gestattet. 



More information about the pgpool-general mailing list