<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 5, 2015 at 11:41 AM, Steve Singer <span dir="ltr"><<a href="mailto:ssinger@ca.afilias.info" target="_blank">ssinger@ca.afilias.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 02/05/2015 02:03 PM, Tory M Blue wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
On Thu, Feb 5, 2015 at 10:45 AM, Steve Singer <<a href="mailto:ssinger@ca.afilias.info" target="_blank">ssinger@ca.afilias.info</a><br>
<mailto:<a href="mailto:ssinger@ca.afilias.info" target="_blank">ssinger@ca.afilias.<u></u>info</a>>> wrote:<br>
<br>
On 02/05/2015 01:41 PM, Tory M Blue wrote:<br>
<br>
<br>
<br>
<br></blockquote>
<br>
Your looking for long running transactions not queries.<br>
<br>
What does this give you?<br>
<br>
select state,min(xact_start) from pg_stat_activity group by state ;<br></blockquote><div><br> state | min <br>--------+-------------------------------<br> active | 2015-02-05 12:14:13.445753-08<br> idle | <br>(2 rows)<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
and what is<br>
select txid_current_snapshot(</blockquote><div> <br> txid_current_snapshot <br>-------------------------------<br> 460123733:460124165:460123733<br>(1 row) <br></div></div><br><br></div><div class="gmail_extra">I didn't see anything in the pg_stat table that was not a current job, or a job that had been running for any length of time..<br><br></div><div class="gmail_extra">I went ahead and manually truncated sl_log_1 , the next log switch worked just fine, and the following truncate of sl_log_2 worked automatically as well. I think this has something to do with the size of the table, and the fact that sync events were taking 5-9 seconds each. Maybe, the truncate was being blocked based on those events? I did some checking and I felt secure that all events in sl_log_1 were in fact sync'd/replicated. I can't tell you what was locking that table however.<br><br>But as of right now I seem to be in a good state<br><br></div><div class="gmail_extra">I based the commands off this thread/site<br><br><a href="http://venublog.com/2012/03/12/postgresql-slony-replication-lag-manual-log-tables-cleanup/">http://venublog.com/2012/03/12/postgresql-slony-replication-lag-manual-log-tables-cleanup/</a><br><br></div><div class="gmail_extra">older version but since I was not doing a delete and following the truncate that 2.2 uses, felt I was in okay shape to go behind the curtains and try to shake slon loose.<br><br>Thanks Steve!<br>Tory<br></div></div>