<div dir="ltr">Hi<div><br></div><div>I am trying to investigate the issue, meanwhile, can you please share the pgpool.conf file, pgpool-II log file when the problem occurs and PostgreSQL version information.</div><div><br></div><div>Also <span style="font-size:12.8000001907349px">pgpool-II 3.3.2 is little older. Can you confirm if the problem persists after updating to the latest version </span><span style="font-size:12.8000001907349px">3.3.5</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks</span></div><div><span style="font-size:12.8000001907349px">Kind regards!</span></div><div><span style="font-size:12.8000001907349px">Muhammad Usama</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 6, 2015 at 8:01 PM, Steve Kuekes <span dir="ltr">&lt;<a href="mailto:steve.kuekes@physicianspharmacy.com" target="_blank">steve.kuekes@physicianspharmacy.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    pgpool is handling the replication<br>
    <br>
    I have<br>
    <br>
    replication_mode = on<br>
    <br>
    in my configuration.  The question is how can the 2 nodes get out of
    sync.  All database access to the Postgres nodes is going through
    pgpool.<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Steve</font></span><div><div class="h5"><br>
    <br>
    <div>On 03/06/2015 09:41 AM, Muhammad Usama
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Steve<br>
        <br>
        What kind of replication are you using between backend nodes?<br>
        <br>
        <i><b>replication_stop_on_mismatch</b></i> and <i><b>failover_if_affected_tuples_mismatch</b></i>
        configuration parameters dictate the behavior of pgpool-II, when
        the synchronization problem  between PostgreSQL backends is
        detected. These parameters have nothing to do for keeping the
        data consistent between nodes. For that you have to check why
        one of the node lacks behind the other. <br>
        <br>
        Thanks
        <div>Kind regards!</div>
        <div>Muhammad Usama<br>
          <br>
          On Fri, Mar 6, 2015 at 1:42 AM, Steve Kuekes &lt;<a href="mailto:steve.kuekes@physicianspharmacy.com" target="_blank">steve.kuekes@physicianspharmacy.com</a>&gt;
          wrote:<br>
          &gt; I am running pgpool version pgpool-II version 3.3.2
          (tokakiboshi) in<br>
          &gt; replication mode with 2 back ends with load balancing. 
          We have a very busy<br>
          &gt; database and we cannot seem to keep both back ends up for
          longer that 12-16<br>
          &gt; hours of production.<br>
          &gt;<br>
          &gt; These are the messages I get in the pgpool log when the
          failover occurs<br>
          &gt;<br>
          &gt; Mar  5 12:50:03 ppasv57 pgpool[1421]: pgpool detected
          difference of the<br>
          &gt; number of inserted, updated or deleted tuples. Possible
          last query was:<br>
          &gt; &quot;update ppadata.notebase set ntbmsgcount=$1,ntbupdated=$2
          where ntbid=$3&quot;<br>
          &gt; Mar  5 12:50:03 ppasv57 pgpool[1421]: CommandComplete:
          Number of affected<br>
          &gt; tuples are: 1 0<br>
          &gt; Mar  5 12:50:03 ppasv57 pgpool[1421]: ReadyForQuery:
          Degenerate backends: 1<br>
          &gt; Mar  5 12:50:03 ppasv57 pgpool[1421]: ReadyForQuery:
          Number of affected<br>
          &gt; tuples are: 1 0<br>
          &gt; Mar  5 12:50:03 ppasv57 pgpool[1421]:
          degenerate_backend_set: 1 fail over<br>
          &gt; request from pid 1421<br>
          &gt; Mar  5 12:50:03 ppasv57 pgpool[2896]: starting
          degeneration. shutdown host<br>
          &gt; ppasv59g(9999)<br>
          &gt; Mar  5 12:50:03 ppasv57 pgpool[2896]: Restart all
          children<br>
          &gt;<br>
          &gt; This update statement is being done within a postgres
          transaction and it<br>
          &gt; appears after the failover the transaction was
          successfully rolled back on<br>
          &gt; both back ends.<br>
          &gt;<br>
          &gt; We have the following options set in the pgpool.conf<br>
          &gt;<br>
          &gt; replication_stop_on_mismatch = on<br>
          &gt; failover_if_affected_tuples_mismatch = on<br>
          &gt;<br>
          &gt; Don&#39;t we need to have these options set to make sure that
          both back ends<br>
          &gt; have exactly the same data?<br>
          &gt;<br>
          &gt; What do I need to do to keep both back ends up?<br>
          &gt;<br>
          &gt; Thanks for any help<br>
          &gt;<br>
          &gt; Steve<br>
          &gt;<br>
          &gt; --<br>
          &gt; Steve Kuekes<br>
          &gt;<br>
          &gt; Physicians Pharmacy Alliance<br>
          &gt; 118 MacKenan Drive, Suite 200<br>
          &gt; Cary, NC  27511<br>
          &gt; 919-465-5801 direct<br>
          &gt; 919-463-5555 main<br>
          &gt; 919-463-5566 fax<br>
          &gt;<br>
          &gt; <a href="mailto:steve.kuekes@physicianspharmacy.com" target="_blank">steve.kuekes@physicianspharmacy.com</a><br>
          &gt;<br>
          &gt; _______________________________________________<br>
          &gt; pgpool-general mailing list<br>
          &gt; <a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
          &gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a></div>
      </div>
    </blockquote>
    <br>
    <pre cols="72">-- 
Steve Kuekes

Physicians Pharmacy Alliance
118 MacKenan Drive, Suite 200
Cary, NC  27511
919-465-5801 direct
919-463-5555 main
919-463-5566 fax

<a href="mailto:steve.kuekes@physicianspharmacy.com" target="_blank">steve.kuekes@physicianspharmacy.com</a>
</pre>
  </div></div></div>

</blockquote></div><br></div>