<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">>Seems like a customer wants to change the PK of a replicated table...<br>>and
from what i understood in the docs we shouldn't be using EXECUTE<br>>SCRIPT
for that... i'm right?<br><br>Wrong! You do want to use EXECUTE SCRIPT. That insures the changed is propagated on all slaves at the same time. Just keep in mind that EXECUTE SCRIPT will lock all tables in a set. The big question is why is the primary key changing? If it's because the customer mistakenly wants to change the default sort order, or lookup, then it is best to just create another index on the tables.<br><br><div id="RTEContent"><font size="4"><span style="font-weight: bold; font-family: arial; color: rgb(0, 0, 255);">Melvin Davidson </span></font><br>From: Jaime Casanova <jcasanov@systemguards.com.ec><br></div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">Subject: [Slony1-general] [slony-general] changing the PK of a replicated table<br>To: "slony" <slony1-general@lists.slony.info><br>Date: Monday, April 26, 2010, 11:26 AM<br><br><div class="plainMail">Hi,<br><br>Seems like a
customer wants to change the PK of a replicated table...<br>and from what i understood in the docs we shouldn't be using EXECUTE<br>SCRIPT for that... i'm right?<br>so what are my options (besides to blame the customer for doing that)?<br>set drop table, change, readd it using a merge?<br><br>-- <br>Atentamente,<br>Jaime Casanova<br>Soporte y capacitación de PostgreSQL<br>Asesoría y desarrollo de sistemas<br>Guayaquil - Ecuador<br>Cel. +59387171157<br>_______________________________________________<br>Slony1-general mailing list<br><a ymailto="mailto:Slony1-general@lists.slony.info" href="/mc/compose?to=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></blockquote></td></tr></table><br>