Vivek Khera vivek at khera.org
Wed Sep 3 08:29:10 PDT 2008
On Wed, Sep 3, 2008 at 11:19 AM, David Lee Lambert
<dlambert at bmtcarhaul.com>wrote:

> Let's say I have three servers,  X, Y and P.  X and Y are "test" instance=
s,
> P
> is "production" (or closer to it).  X and Y have Slony installed, P has n=
ot
> been used for Slony before.  Can I install Slony on P and use the same set
> definition to start replicating to Y from P?  Or do I need to create a new
> set, even though the table-names would be the same?
>
> What's a good sequence of commands to do this?
>

Yes, you can do this.  Something along these lines:

First, create the DB and load an empty schema identical to the origin's
schema.

Next, add the node:

  store node (id =3D 3, event node =3D 4, comment =3D 'Node 3');
  store path (server =3D 4, client =3D 3, conninfo =3D 'host=3Dd04 dbname=
=3Dxyz
user=3Dslony port=3D5432');
  store path (server =3D 3, client =3D 4, conninfo =3D 'host=3Dd03 dbname=
=3Dxyz
user=3Dslony port=3D5432');

And then subscribe the set:

 subscribe set (id =3D 1, provider =3D 4, receiver =3D 3, forward =3D no);

sit back, relax, and watch the logs to see when it is done copying the set.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20080903/=
aa4d5c99/attachment-0001.htm


More information about the Slony1-general mailing list