<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi Steve</span></div><div><br><span></span></div><div><span>Thanks for your reply.</span></div><div><br><span></span></div><div><span>Kind regards.</span></div><div><br><span></span></div><div><span>David.</span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">De&nbsp;:</span></b> Steve Singer &lt;steve@ssinger.info&gt;<br> <b><span style="font-weight: bold;">À&nbsp;:</span></b> David TECHER &lt;davidtecher@yahoo.fr&gt; <br><b><span style="font-weight: bold;">Cc&nbsp;:</span></b> Slony Hackers &lt;slony1-hackers@lists.slony.info&gt; <br> <b><span style="font-weight: bold;">Envoyé le
 :</span></b> Lundi 27 février 2012 4h16<br> <b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: [Slony1-hackers] Updating table DDL by removing table/adding from/to replication<br> </font> </div> <br>On Sun, 26 Feb 2012, David TECHER wrote:<br><br>&gt; Hi<br>&gt; <br>&gt; I use Slony 1.2.22<br>&gt; <br>&gt; Replication: 1 master and 3 slaves.<br><br>&gt; "Slony command DDL"&nbsp; can not be used because it will take to much time and<br>&gt; we've got a lot of replicated tables.<br>&gt; I am afraid that window of week-end will be not enough.<br><br>I assume the problem is that you have a lot of tables and that the time slony takes to remove the replication triggers on each table in execute_script is to long. You should plan an upgrade to 2.x since execute script no longer does this.<br><br>&gt; For the next update, what I would like to suggest to my team&nbsp; ( and we will<br>&gt; have the intention to test if I can convice them) is<br>&gt;
 <br>&gt; 1)&nbsp; removing all tables - to be altered -&nbsp; from replication using set drop<br>&gt; table(origin=??,id=??)<br>&gt; <br>&gt; 2) apply all DDL queries to the future altered table ( usual way : psql<br>&gt; ....database)<br>&gt; <br>&gt; 3)&nbsp; back all altered tables to replication :<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - create set (...)<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - set add table(...) to new set<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - merge set (new set to the old set associated to the altered<br>&gt; table).<br>&gt; <br>&gt; Can we do that?&nbsp;<br><br>I don't see any reason why that wouldn't work. You would need to subscribe the subscribers to the new set before you do the merge set.&nbsp; This will cause the tables on the subscriber to be truncated and re-populated.&nbsp; As always, you should make sure you do proper 'wait for events' so the subscribe doesn't happen
 before all of the subscriber has seen the drop table.<br><br>Steve<br><br><br>&gt; <br>&gt; There is no concurrent activity and we've got the window of the week-end.<br>&gt; <br>&gt; Thanks for your reply.<br>&gt; <br>&gt; <br><br><br> </div> </div>  </div></body></html>