Christopher Browne cbbrowne at ca.afilias.info
Mon Mar 24 14:39:43 PDT 2008
Kenny Gorman <kgorman at hi5.com> writes:
> I poked through the archives but didn't see any answers to this
> question.
>
>
> We have many databases that we replicate via slony (200+ GB each).
> The problem is that the initial COPY is slow, and a single process.
> We have a faster, lower level mechanism to clone an entire database
> much faster, thus I would like to disable the initial truncate/COPY of
> slony during initialization.  This approach would require a small
> downtime to perform the last sync/quiesce, but our application can
> tolerate that.  Essentially I would guarantee that the databases are
> in sync, exactly, using a different mechanism (in this case disk level
> snapshots).  We use this mechanism currently to clone databases, but
> it would be nice to extend it for slony setup.  I looked through the
> source, and it seems possible to change things to support this type of
> initialization.
>
> The process I am thinking of is something like:
>
> start disk sync on A to B
> shutdown A
> sync last bits from A to B
> startup A on different port ( no traffic except me )
> startup B on different port ( no traffic except me )
> subscribe set in slony w/o TRUNCATE/COPY
> restart A on prod port
> restart B on prod port
> start slon processes

Patches are in place to support this process in CVS HEAD, via a new
pair of commands:

 CLONE PREPARE - which you would run somewhere near the beginning of
                 the process; this indicates the plan for a new node 
                 to be created;

 CLONE FINISH - runs later, in effect, once the DB for B becomes
                available.  It then does the "identity change"
                to tell database "B" (which still thinks it's A)
                that it is now "B".

http://lists.slony.info/pipermail/slony1-commit/2008-January/002145.html
http://lists.slony.info/pipermail/slony1-commit/2008-January/002146.html
http://lists.slony.info/pipermail/slony1-commit/2008-January/002147.html
http://lists.slony.info/pipermail/slony1-commit/2008-January/002148.html
http://lists.slony.info/pipermail/slony1-commit/2008-January/002149.html
http://lists.slony.info/pipermail/slony1-commit/2008-January/002150.html
http://lists.slony.info/pipermail/slony1-commit/2008-January/002151.html
http://lists.slony.info/pipermail/slony1-commit/2008-January/002152.html
-- 
output = ("cbbrowne" "@" "linuxdatabases.info")
http://cbbrowne.com/info/lsf.html
Rules of the  Evil Overlord #22. "No matter how tempted  I am with the
prospect  of unlimited  power, I  will  not consume  any energy  field
bigger than my head. <http://www.eviloverlord.com/>


More information about the Slony1-general mailing list