Thanks Steve.  I&#39;ve put the dumps for the master and my two slaves at <a href="http://richyen.com/slony/">http://richyen.com/slony/</a><div><br></div><div>Thanks again,</div><div>--Richard</div><div><br></div><div><br>
<br><div class="gmail_quote">On Wed, May 11, 2011 at 1:21 PM, Steve Singer <span dir="ltr">&lt;<a href="mailto:ssinger@ca.afilias.info">ssinger@ca.afilias.info</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 11-05-11 04:18 PM, Richard Yen wrote:<br>
&gt; Thanks Jan,<br>
&gt;<br>
&gt; I&#39;ll go ahead and do as recommended.  I was actually hoping that maybe<br>
&gt; we could scour the sl_confirm and/or sl_event tables for clues, but if<br>
&gt; you think it&#39;s not possible to find out what happened, I guess I&#39;ll just<br>
&gt; delete the row and move on.<br>
&gt;<br>
&gt; Thanks again,<br>
&gt; --Richard<br>
<br>
</div>If you can get a dump of sl_event and sl_confirm of both the master and<br>
the slave and send it to one of us we can take a look.<br>
<br>
If you happen to have slon logs of the period it can&#39;t hurt to send<br>
those as well.<br>
<div class="im"><br>
<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Wed, May 11, 2011 at 1:12 PM, Jan Wieck &lt;<a href="mailto:JanWieck@yahoo.com">JanWieck@yahoo.com</a><br>
</div><div><div></div><div class="h5">&gt; &lt;mailto:<a href="mailto:JanWieck@yahoo.com">JanWieck@yahoo.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     On 5/11/2011 2:56 PM, Richard Yen wrote:<br>
&gt;<br>
&gt;         Hello,<br>
&gt;<br>
&gt;         running slon version 2.0.6 here...<br>
&gt;<br>
&gt;<br>
&gt;     This is the first time I&#39;ve heard about an operation missing. I<br>
&gt;     remember in some old version of PostgreSQL (8.1 I think) that we<br>
&gt;     experienced duplicate sl_log rows due to index corruption. I was<br>
&gt;     actually able to get a result set with a duplicate ctid. But never<br>
&gt;     was a row missing so far.<br>
&gt;<br>
&gt;     To fix your replica(s), you should be able to manually DELETE the<br>
&gt;     offending row using psql and doing<br>
&gt;<br>
&gt;         set session_replication_role to &quot;replica&quot;;<br>
&gt;         delete from cron_lock where ...<br>
&gt;<br>
&gt;     You need to be a superuser to do so. After that SET statement, the<br>
&gt;     psql prompt will bypass the deny_access triggers and the DELETE<br>
&gt;     statement will behave exactly as if it was coming from slon.<br>
&gt;<br>
&gt;     I assume that by now, a log switch has probably destroyed all traces<br>
&gt;     that could be used to debug the problem further.<br>
&gt;<br>
&gt;<br>
&gt;     Jan<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;         Would anyone be able to help me track down why slony missed a<br>
&gt;         DELETE?<br>
&gt;           It seems that my replication is broken as the subscribers are<br>
&gt;         trying<br>
&gt;         to process an INSERT, but a primary key is being violated.  The<br>
&gt;         origin<br>
&gt;         machine does not have the offending tuple, which leads me to believe<br>
&gt;         that a DELETE was processed, but wasn&#39;t propagated to the<br>
&gt;         subscribers<br>
&gt;<br>
&gt;           From my origin machine:<br>
&gt;         my_db=# select * from cron_lock;<br>
&gt;                  id         |      lock_until_time<br>
&gt;         -------------------+----------------------------<br>
&gt;           anonymous_marking | 2011-05-11 11:40:02.456091<br>
&gt;         (1 row)<br>
&gt;<br>
&gt;           From my subscriber machines:<br>
&gt;         my_db=# select * from cron_lock ;<br>
&gt;                  id         |      lock_until_time<br>
&gt;         -------------------+----------------------------<br>
&gt;           anonymous_marking | 2011-05-11 10:40:02.123721<br>
&gt;         (1 row)<br>
&gt;<br>
&gt;           From the origin&#39;s sl_log_* tables:<br>
&gt;         my_db=# select * from _sac_uk.sl_log_2 where log_tableid =190;<br>
&gt;           log_origin |  log_txid  | log_tableid | log_actionseq |<br>
&gt;         log_cmdtype |<br>
&gt;                                                      log_cmddata<br>
&gt;         ------------+------------+-------------+---------------+-------------+-----------------------------------------------------------------------------------------------------<br>
&gt;                    1 | 1369072247 |         190 |     239698918 | I<br>
&gt;                |<br>
&gt;         (&quot;id&quot;,&quot;lock_until_time&quot;) values (&#39;anonymous_marking&#39;,&#39;2011-05-11<br>
&gt;         11:40:02.456091&#39;)<br>
&gt;                    1 | 1369182578 |         190 |     239728797 | I<br>
&gt;                |<br>
&gt;         (&quot;id&quot;,&quot;lock_until_time&quot;) values<br>
&gt;         (&#39;<a href="http://process_past_due_pm_assignments.pl" target="_blank">process_past_due_pm_assignments.pl</a><br>
&gt;         &lt;<a href="http://process_past_due_pm_assignments.pl" target="_blank">http://process_past_due_pm_assignments.pl</a>&gt;<br>
&gt;         &lt;<a href="http://process_past_due_pm_assignments.pl" target="_blank">http://process_past_due_pm_assignments.pl</a>&gt;&#39;,&#39;2011-05-11<br>
&gt;         11:00:23.944101&#39;)<br>
&gt;<br>
&gt;                    1 | 1369182587 |         190 |     239728806 | D<br>
&gt;                |<br>
&gt;         &quot;id&quot;=&#39;<a href="http://process_past_due_pm_assignments.pl" target="_blank">process_past_due_pm_assignments.pl</a><br>
&gt;         &lt;<a href="http://process_past_due_pm_assignments.pl" target="_blank">http://process_past_due_pm_assignments.pl</a>&gt;<br>
&gt;         &lt;<a href="http://process_past_due_pm_assignments.pl" target="_blank">http://process_past_due_pm_assignments.pl</a>&gt;&#39;<br>
&gt;<br>
&gt;                    1 | 1369182626 |         190 |     239728830 | I<br>
&gt;                |<br>
&gt;         (&quot;id&quot;,&quot;lock_until_time&quot;) values<br>
&gt;         (&#39;<a href="http://process_past_due_pm_assignments.pl" target="_blank">process_past_due_pm_assignments.pl</a><br>
&gt;         &lt;<a href="http://process_past_due_pm_assignments.pl" target="_blank">http://process_past_due_pm_assignments.pl</a>&gt;<br>
&gt;         &lt;<a href="http://process_past_due_pm_assignments.pl" target="_blank">http://process_past_due_pm_assignments.pl</a>&gt;&#39;,&#39;2011-05-11<br>
&gt;<br>
&gt;         11:00:24.525818&#39;)          1 | 1369182671 |         190 |<br>
&gt;         239728833<br>
&gt;         | D           | &quot;id&quot;=&#39;<a href="http://process_past_due_pm_assignments.pl" target="_blank">process_past_due_pm_assignments.pl</a><br>
&gt;         &lt;<a href="http://process_past_due_pm_assignments.pl" target="_blank">http://process_past_due_pm_assignments.pl</a>&gt;<br>
&gt;         &lt;<a href="http://process_past_due_pm_assignments.pl" target="_blank">http://process_past_due_pm_assignments.pl</a>&gt;&#39;<br>
&gt;<br>
&gt;         (5 rows)<br>
&gt;<br>
&gt;         my_db=# select * from _sac_uk.sl_log_1 where log_tableid =190;<br>
&gt;           log_origin |  log_txid  | log_tableid | log_actionseq |<br>
&gt;         log_cmdtype |<br>
&gt;                                             log_cmddata<br>
&gt;         ------------+------------+-------------+---------------+-------------+------------------------------------------------------------------------------------<br>
&gt;                   1 | 1369393174 |         190 |     239789790 | D<br>
&gt;              |<br>
&gt;         &quot;id&quot;=&#39;anonymous_marking&#39;<br>
&gt;                    1 | 1369403276 |         190 |     239793047 | I<br>
&gt;                |<br>
&gt;         (&quot;id&quot;,&quot;lock_until_time&quot;) values (&#39;anonymous_marking&#39;,&#39;2011-05-11<br>
&gt;         12:40:02.970433&#39;)(2 rows)<br>
&gt;<br>
&gt;         On the subscriber logs:May 11 11:54:40 uk-sdb2 postgres[30851]:<br>
&gt;         [926-1]<br>
&gt;         2011-05-11 11:54:40.755 PDT [user=slony,db=my_db 10.1.0.149(47318)<br>
&gt;         PID:30851 XID:1509911291]ERROR:  duplicate key value violates unique<br>
&gt;         constraint &quot;cron_lock_pkey&quot;<br>
&gt;         May 11 11:54:40 uk-sdb2 postgres[30851]: [926-2] 2011-05-11<br>
&gt;         11:54:40.755<br>
&gt;         PDT [user=slony,db=my_db 10.1.0.149(47318) PID:30851<br>
&gt;         XID:1509911291]STATEMENT:  update only &quot;public&quot;.&quot;m_user&quot; set<br>
&gt;         &quot;last_login&quot;=&#39;2011-05-11 10:40:02.429308&#39; where &quot;id&quot;=&#39;2459339&#39;;<br>
&gt;<br>
&gt;         Any help would be much appreciated.<br>
&gt;         --Richard<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;         _______________________________________________<br>
&gt;         Slony1-general mailing list<br>
&gt;         <a href="mailto:Slony1-general@lists.slony.info">Slony1-general@lists.slony.info</a><br>
</div></div>&gt;         &lt;mailto:<a href="mailto:Slony1-general@lists.slony.info">Slony1-general@lists.slony.info</a>&gt;<br>
<div><div></div><div class="h5">&gt;         <a href="http://lists.slony.info/mailman/listinfo/slony1-general" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     --<br>
&gt;     Anyone who trades liberty for security deserves neither<br>
&gt;     liberty nor security. -- Benjamin Franklin<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Slony1-general mailing list<br>
&gt; <a href="mailto:Slony1-general@lists.slony.info">Slony1-general@lists.slony.info</a><br>
&gt; <a href="http://lists.slony.info/mailman/listinfo/slony1-general" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br>
<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>
</div></div></blockquote></div><br></div>