<div dir="ltr">No reason besides we were new to slony and had no idea what we were doing at the beginning and now it will be a hassle to change for everyone that has this.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 8:50 AM, Jan Wieck <span dir="ltr"><<a href="mailto:jan@wi3ck.info" target="_blank">jan@wi3ck.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/29/2015 09:49 PM, Sung Hsin Lei wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Actually, node 2 is correct. I have 2 different clusters. Each cluster<br>
has node 1 and node 2. Each cluster replicates to 1 db.<br>
</blockquote>
<br></span>
What is the reason for this setup? If the two slaves are subscribed to different sets of tables, then the same can be achieved by creating multiple sets and subscribing the slaves to individual combinations of them.<br>
<br>
<br>
Regards, Jan<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
On Thu, Oct 29, 2015 at 8:39 PM, Scott Marlowe <<a href="mailto:scott.marlowe@gmail.com" target="_blank">scott.marlowe@gmail.com</a><br></span><span class="">
<mailto:<a href="mailto:scott.marlowe@gmail.com" target="_blank">scott.marlowe@gmail.com</a>>> wrote:<br>
<br>
On Thu, Oct 29, 2015 at 6:06 PM, Sung Hsin Lei <<a href="mailto:sungh.lei@gmail.com" target="_blank">sungh.lei@gmail.com</a><br></span><div><div class="h5">
<mailto:<a href="mailto:sungh.lei@gmail.com" target="_blank">sungh.lei@gmail.com</a>>> wrote:<br>
> Hello,<br>
><br>
> I successfully update the main db and one replicated db with the following:<br>
><br>
> cluster name = slony_rep1<br>
><br>
> node 1 admin conninfo = 'dbname = MyDB host = localhost user = slony1<br>
> password = Ejhfg33EdddsufhErR76 port = 6234';<br>
> node 2 admin conninfo = 'dbname = MyDB host = 86.88.5.4 user = slony1<br>
> password = Ejhfg33EdddsufhErR76 port = 6234';<br>
><br>
> EXECUTE SCRIPT<br>
> (<br>
> SQL = 'ALTER TABLE operators RENAME COLUMN firstname TO lastname;',<br>
> EVENT NODE = 1<br>
> );<br>
><br>
><br>
><br>
><br>
> However, I have 1 main db to 2 replicated db. The second replicated db has<br>
> the following cluster name and node information:<br>
><br>
> cluster name = slony_rep2<br>
><br>
> node 1 admin conninfo = 'dbname = MyDB host = localhost user = slony2<br>
> password = Ejhfg33EdddsufhErR76 port = 6234';<br>
> node 2 admin conninfo = 'dbname = MyDB host = 86.88.5.17 user = slony2<br>
> password = Ejhfg33EdddsufhErR76 port = 6234';<br>
<br>
Shouldn't that be node 3 not node 2?<br>
<br>
> Do I need to run slonik twice with different cluster and node indo? That<br>
> does not seem right. After running the first time, the main db and the first<br>
> replicated db will be consistent but not the second replicated db. Also, if<br>
> I run it a second time, wouldn't the main db already be updated hence the<br>
> sql statements used for the original update will surely fail?<br>
<br>
You can just run it on all three at once.<br>
<br>
node 1 admin conninfo = 'dbname = MyDB host = localhost user = slony1<br>
password = Ejhfg33EdddsufhErR76 port = 6234';<br>
node 2 admin conninfo = 'dbname = MyDB host = 86.88.5.4 user = slony1<br>
password = Ejhfg33EdddsufhErR76 port = 6234';<br>
node 3 admin conninfo = 'dbname = MyDB host = 86.88.5.17 user = slony2<br>
password = Ejhfg33EdddsufhErR76 port = 6234';<br>
<br>
EXECUTE SCRIPT<br>
(<br>
SQL = 'ALTER TABLE operators RENAME COLUMN firstname TO lastname;',<br>
EVENT NODE = 1<br>
);<br>
<br>
<br>
<br>
<br></div></div>
_______________________________________________<br>
Slony1-general mailing list<br>
<a href="mailto:Slony1-general@lists.slony.info" target="_blank">Slony1-general@lists.slony.info</a><br>
<a href="http://lists.slony.info/mailman/listinfo/slony1-general" rel="noreferrer" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Jan Wieck<br>
Senior Software Engineer<br>
<a href="http://slony.info" rel="noreferrer" target="_blank">http://slony.info</a><br>
</font></span></blockquote></div><br></div>