Wed Feb 23 08:52:14 PST 2011
- Previous message: [Slony1-general] controlled switchover
- Next message: [Slony1-general] controlled switchover
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2/23/2011 11:19 AM, Tech Madhu wrote: > hello all, > > Iam somewhat new to Slony. Have a question on controlled switchover. > > I have 1 master/ 1slave setup . When i want to do a switchover, using lock > set, move set, how do i know the 'slave' has caught up with the master? Say > the slave is behind the master by N transactions, and i issue lock set, move > set, will slony automatically ensure the slave gets in sync before doing the > switchover? or is it the 'applications' responsibility.. If its the latter, > how can i tell when the slave has caught up? I looked at: > http://www.slony.info/documentation/monitoring.html > I can't easily tell looking at contents of the sl_status, sl_confirm, > sl_event if the slave has caught up.. The sl_setsync table shows 0 rows, > (sl_setsync : Contains information about the state of synchronization of > each replication set, including transaction snapshot data. ). if its 0, does > it mean everything in sync? 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 LOCK SET ... MOVE SET ... WAIT FOR EVENT (ORIGIN = <old_origin>, CONFIRMED = <new_origin>); SYNC (ID = <new_origin>); WAIT FOR EVENT (ORIGIN = <new_origin>, CONFIRMED = <old_origin>); you are guaranteed that the switchover is complete and everything is caught up. Jan -- Anyone who trades liberty for security deserves neither liberty nor security. -- Benjamin Franklin
- Previous message: [Slony1-general] controlled switchover
- Next message: [Slony1-general] controlled switchover
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list