<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 19, 2014 at 1:50 PM, Kristopher <span dir="ltr">&lt;<a href="mailto:kristopherwilson@gmail.com" target="_blank">kristopherwilson@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>I have the following setup in my conf file:</div><div><br></div><div><div>cleanup_interval=&quot;5 seconds&quot;</div><div><br></div></div></div></div></blockquote><div>...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div></div></div></div><div>However, it only actually runs cleanup about every 10 minutes (the default):</div></div></blockquote></div><br></div><div class="gmail_extra">We have, in fact, three parameters controlling cleanup:</div><div class="gmail_extra"><br></div><div class="gmail_extra">a) cleanup_interval, expressed as a Postgres interval, that, according to the docs, indicates:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"><span class="" style="white-space:pre">        </span>gettext_noop(&quot;A PostgreSQL value compatible with ::interval &quot;</div><div class="gmail_extra"><span class="" style="white-space:pre">                                                </span> &quot;which indicates what aging interval should be used &quot;</div><div class="gmail_extra"><span class="" style="white-space:pre">                                                </span> &quot;for deleting old events, and hence for purging sl_log_* tables.&quot;),</div><div class="gmail_extra"><br></div><div class="gmail_extra">(see src/slon/confoptions.c for that; I expect that there&#39;s a slon option that will make it print out the documentation strings).</div><div class="gmail_extra"><br></div><div class="gmail_extra">b) SLON_CLEANUP_SLEEP, in src/slon/slon.h, which is hardcoded to 600, indicating that every 600 seconds, the cleanup thread is called</div><div class="gmail_extra"><br></div><div class="gmail_extra">c) SLON_VACUUM_FREQUENCY, also in src/slon/slon.h, hardcoded to 3, indicating how often cleanup thread should VACUUM tables.</div><div class="gmail_extra"><br></div><div class="gmail_extra">We haven&#39;t exposed SLON_CLEANUP_SLEEP as a configuration option, and, in effect, that&#39;s a value you&#39;d want to shorten a lot during this process.</div><div class="gmail_extra"><br></div><div class="gmail_extra">It wouldn&#39;t be a great deal of trouble to expose SLON_CLEANUP_SLEEP, and it&#39;s probably somewhat handy to do so, particularly for situations such as what you describe, where we want to avidly empty out sl_log_*.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I&#39;ll see about coming up with a patch, with a view to applying this to the various major releases.</div></div></div>