thanks a bunch for the information.<br><br><div class="gmail_quote">On Wed, Feb 23, 2011 at 11:52 AM, Jan Wieck <span dir="ltr">&lt;<a href="mailto:JanWieck@yahoo.com">JanWieck@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On 2/23/2011 11:19 AM, Tech Madhu wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
hello all,<br>
<br>
Iam somewhat new to Slony. Have a question on controlled switchover.<br>
<br>
I have 1 master/ 1slave setup . When i want to do a switchover, using lock<br>
set, move set, how do i know the &#39;slave&#39; has caught up with the master? Say<br>
the slave is behind the master by N transactions, and i issue lock set, move<br>
set, will slony automatically ensure the slave gets in sync before doing the<br>
switchover? or is it the &#39;applications&#39; responsibility.. If its the latter,<br>
how can i tell when the slave has caught up? I looked at:<br>
<a href="http://www.slony.info/documentation/monitoring.html" target="_blank">http://www.slony.info/documentation/monitoring.html</a><br>
I can&#39;t easily tell looking at contents of the sl_status, sl_confirm,<br>
sl_event if the slave has caught up.. The sl_setsync table shows 0 rows,<br>
(sl_setsync : Contains information about the state of synchronization of<br>
each replication set, including transaction snapshot data. ). if its 0, does<br>
it mean everything in sync?<br>
</blockquote>
<br></div></div>
The MOVE_SET event, generated on the old origin, will cause it to become a subscriber. After that, the event is propagated to the new origin, which on processing it generates the ACCEPT_SET event, which in turn travels back. So if you do<br>

<br>
LOCK SET ...<br>
MOVE SET ...<br>
WAIT FOR EVENT (ORIGIN = &lt;old_origin&gt;, CONFIRMED = &lt;new_origin&gt;);<br>
SYNC (ID = &lt;new_origin&gt;);<br>
WAIT FOR EVENT (ORIGIN = &lt;new_origin&gt;, CONFIRMED = &lt;old_origin&gt;);<br>
<br>
you are guaranteed that the switchover is complete and everything is caught up.<br>
<br>
<br>
Jan<br><font color="#888888">
<br>
-- <br>
Anyone who trades liberty for security deserves neither<br>
liberty nor security. -- Benjamin Franklin<br>
</font></blockquote></div><br>