<div dir="ltr"><div dir="ltr">On Thu, 10 Oct 2019 at 15:23, Klaus Darilion &lt;<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>&gt; wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Hi Christopher!<br>
    </p>
    <div>Am 08.10.2019 um 18:03 schrieb
      Christopher Browne:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">On Tue, 8 Oct 2019 at 03:20, Klaus Darilion &lt;<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>&gt;
          wrote:<br>
        </div>
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
            <br>
            We use Slony 2.1.4, with ~55 global slaves. Susbcribing [1]
            a node takes<br>
            from ~3minutes (a few milli seconds away) to 15 minutes
            (200ms away) -<br>
            one some minutes for the initial sync.<br>
             
            <br>
          </blockquote>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            b) Why does it take so long to subscribe? Can I speed up the
            subscribe?</blockquote>
          <div><br>
          </div>
          <div>Well, the process involves:</div>
          <div>a) Copying all of the data in the replication set, and</div>
          <div>b) Regenerating all of the indexes on the tables (as it
            is almost always faster to deactivate indexes while doing
            the COPY)</div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote>
    <p>As far as I understand adding a node involves 2 steps:</p>
    <p>1. Slony configuration via slonik &quot;subscribe&quot;. This configures
      the cluster and creates the slony namespace on the slave.</p>
    <p>2. Initial sync: COPY the respective tables and sequences from
      the master<br>
    </p>
    <p>The initial sync (2) is actually fast, except there is low
      bandwidth to the slave. But the &quot;subscribe&quot; (1) is slow for far
      away nodes (in terms of RTT) <br></p></div></blockquote><div>Oh, that&#39;s interesting that #1 is the slow part.</div><div><br></div><div>Yes, if you are running that across a high latency link, that could be pretty terrible.</div><div><br></div><div>I&#39;d suggest running the slonik script on a host right near the subscriber; that would reduce the latency.  But there isn&#39;t so extraordinarily much configuration for that to be a problem???</div><div><br></div><div>Hmm.  The work of setting up the node takes place via communications between the slon process that manages the node and the database.  If the slon is far away, latency gets bad.</div><div><br></div><div>So the slon should run in the same data centre as the database that it manages,<br></div></div><br>-- <br><div dir="ltr" class="gmail_signature">When confronted by a difficult problem, solve it by reducing it to the<br>question, &quot;How would the Lone Ranger handle this?&quot;<br></div></div>