<div dir="ltr"><div><div>As you told, table seemed to be corrupted. I got two rows from this select:<br>SELECT bco_cod, pla_cod, COUNT(*) from &quot;8357_isarq&quot;.&quot;wm_bco_pla&quot; GROUP BY bco_cod, pla_cod HAVING      COUNT(*) &gt; 1; <br><br></div>Ran a delete to remove the two rows and SLONY could continue on with the processing.<br><br></div><div>Hope to get the replication finished soon in order to end the migration from 8.3 to 9.3.<br></div><div><br></div>Thank you!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 16, 2014 at 12:16 PM, Andrew Sullivan <span dir="ltr">&lt;<a href="mailto:ajs@crankycanuck.ca" target="_blank">ajs@crankycanuck.ca</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Dec 16, 2014 at 08:32:03AM -0200, Carlos Henrique Reimer wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m trying to replicate a postgresql database 8.3 with 1TB data and about<br>
<br>
</span>8.3.what?  And also, is that a typo, or do you really mean 8.3?  If<br>
so, I hope you&#39;re aware that you&#39;re running a database system that was<br>
EOL&#39;d by the community almost two years ago.<br>
<br>
On the issue:<br>
<span class=""><br>
&gt; &quot;8357_isarq&quot;.&quot;wm_bco_pla&quot;; &quot; PGRES_FATAL_ERROR ERROR:  could not create<br>
&gt; unique index &quot;pk_wm_bco_pla&quot;<br>
&gt; DETAIL:  Key (bco_cod, pla_cod)=(399, 5056110) is duplicated.<br>
&gt; CONTEXT:  SQL statement &quot;reindex table &quot;8357_isarq&quot;.&quot;wm_bco_pla&quot;&quot;<br>
<br>
</span><span class="">&gt; The error indicates &quot;8357_isarq&quot;.&quot;wm_bco_pla&quot; has duplicated rows for<br>
&gt; primary key  (bco_cod, pla_cod)=(399, 5056110) but when I query the table<br>
&gt; using this pk I got only one row:<br>
&gt;<br>
&gt; select * from &quot;8357_isarq&quot;.&quot;wm_bco_pla&quot; where bco_cod=399 and pla_cod =<br>
&gt; &#39;5056110&#39;;<br>
&gt;  bco_cod | pla_cod |                pla_des                | ativo |<br>
&gt; conta_pai | pla_itlistserv | pla_ctacosif<br>
&gt; ---------+---------+---------------------------------------+-------+-----------+----------------+--------------<br>
&gt;      399 | 5056110 | RENDAS TRANSACOES VISA ELETRON - HBBR | S     |<br>
&gt; 5056004   |           1501 | 71799003<br>
&gt; (1 row)<br>
<br>
</span>Are you quite sure that your source table isn&#39;t corrupt?  That&#39;d be my<br>
first suspicion.  I&#39;d dump the source table and look for a duplicate<br>
before jumping to the conclusion that you are going to &quot;lose three<br>
days of replication processing&quot;.  Your replica may in fact contain a<br>
copy of a corrupted database, and it might be tripping on this.<br>
<br>
Best regards,<br>
<br>
A<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Andrew Sullivan<br>
<a href="mailto:ajs@crankycanuck.ca">ajs@crankycanuck.ca</a><br>
_______________________________________________<br>
Slony1-general mailing list<br>
<a href="mailto:Slony1-general@lists.slony.info">Slony1-general@lists.slony.info</a><br>
<a href="http://lists.slony.info/mailman/listinfo/slony1-general" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br>
</font></span></blockquote></div><br clear="all"><br>-- <br><div class="gmail_signature">Reimer<br>47-3347-1724 47-9183-0547 msn: <a href="mailto:carlos.reimer@opendb.com.br">carlos.reimer@opendb.com.br</a><br></div>
</div>