Fri Jun 12 13:32:37 PDT 2009
- Previous message: [Slony1-general] Switchover issue.
- Next message: [Slony1-general] Upgrade to 2.0 proposal: Subscribe set OMIT COPY option
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
There was a discussion Some Time Ago about how to accomplish an upgrade from 1.2 to 2.0, where I outlined a proposed mechanism. http://lists.slony.info/pipermail/slony1-general/2009-February/009193.html It bears a certain resemblance to pg_migrator in the sense that it would do rather a lot of grovelling around throughout the Slony-I data structures to fix things up. Another thought came up this week; Jan suggested the thought that what we could do is to add an OMIT COPY option to the SUBSCRIBE SET command, and basically handle the upgrade via the following process: Step 0. You decide it's time to upgrade. Lock out users (via pg_hba.conf), and make sure replication is caught up. Outage of application begins. ---- From here on, it's important for there to be ZARRO changes made to data!!! ---- Step 1. Stop v1.2 slons. Step 2. Run UNINSTALL NODE on all nodes. At this point, replication is gone from your environment, and all nodes are recovered so that pg_catalog is no longer "hacked up" by Slony-I. Step 3. You may wish to stop postmaster as part of the process of shuffling new Slony-I 2.0 binaries into place. Step 4. Recreate replication. Using Slony-I 2.0 tools. The notable Special Thing is that SUBSCRIBE SET requests are submitted with the new OMIT COPY option. This option causes the slons to not bother doing TRUNCATE/COPY. Steps 1-4 should only take a few seconds, as: a) Everyone's locked out, so there are no locks being held b) We're just throwing in metadata, NOT 18-hour-long COPY statements Once all nodes are subscribed, and things are looking well, it should be safe to let the users back in, and start back up. There are a number of other possible uses for SUBSCRIBE SET with OMIT COPY; I'll leave thoughts about that to other postings :-). I have a seemingly-working patch, along with a regression test; attached below. Comments, rocks, tomatoes, all welcome :-) -------------- next part -------------- A non-text attachment was scrubbed... Name: omitcopy.bz2 Type: application/octet-stream Size: 3744 bytes Desc: not available Url : http://lists.slony.info/pipermail/slony1-general/attachments/20090612/c3fa1b6e/omitcopy.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testomitcopy.tar.bz2 Type: application/octet-stream Size: 3033 bytes Desc: not available Url : http://lists.slony.info/pipermail/slony1-general/attachments/20090612/c3fa1b6e/testomitcopy.tar.obj -------------- next part -------------- -- select 'cbbrowne' || '@' || 'cbbrowne.com'; http://linuxfinances.info/info/ "You shouldn't make my toaster angry." -- Household security explained in "Johnny Quest"
- Previous message: [Slony1-general] Switchover issue.
- Next message: [Slony1-general] Upgrade to 2.0 proposal: Subscribe set OMIT COPY option
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list