"Stéphane A. Schildknecht" stephane.schildknecht at postgresql.fr
Tue Jul 19 11:29:18 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 19/07/2011 18:03, marmu a écrit :
> 
> Hi guys,
> 
> gotta ask here for advice, after asking on IRC. My college told me he set up
> slony on an existing DB. Now I am trying to copy 2 DBs from our old server
> to new hardware. I already imported the globals, the structure and the data
> from the old server. Is it even possible to get slony working on this new
> machine now?
> replication is local between to DBs for now. slony won't work:
> 
> fquest-b1:/etc/slony-I # /etc/init.d/slony-I_fquest_master start
> fquest-b1:/etc/slony-I # cat  /var/log/slony-I/master_fquest.log
> -->...
> -->2011-07-08 16:57:57 CESTERROR  Slony-I schema version is 2.0.5
> -->2011-07-08 16:57:57 CESTERROR  please upgrade Slony-I schema to version
> 2.0.6
> -->...
> 
> /etc/slony-I/slonik < upgradeslony
> <stdin>:6: PGRES_FATAL_ERROR select
> "_catimaster".getLocalNodeId('_catimaster'); - ERROR:  schema "_catimaster"
> does not exist
> <stdin>:6: database specified in <stdin>:4 reports no_id -1
> 
> 
> then I started again looking at the tutorial (2.1.2. Preparing the
> Databases) and thought the following might help...:
> "createdb -O $PGBENCHUSER -h $MASTERHOST $MASTERDBNAME"
> 
> but of course it leads to the following error:
> -->ERROR:  database "catimaster" already exists
> 
> yes, it exists...
> 
> what now, do I really have to start from scratch? I kind IRC user in #slony
> told me this is the way to go:
> ...
> a) you have to drop slony schema from server B ( thats of no use )
> b) create another db, where you will replicate on the same server in your
> case
> c) install slony from scratch..
> d) init db
> 
> and ya... after init node.. you would need to do create set and set add
> table too..
> 
> e) store node
> f) store path
> g) start the slons and subscribe
> 
> schema you get from pg_dump is of no use...
> when you do init node ... it will get created again..
> ...

> 
> Any help is highly appreciated, since I am new to slony. Thanks a lot in
> advance.

Hi,

Seems like you are confusing between slony schema and db schema.

First error (slony schema version) indicates you need to have the same *slony*
version on every node.
2.0.6, I guess.

To sum up, could you tell us how you settled your nodes ?
pg_dump should do the trick, but you have to drop the slony schema after
restoring the dump.

If you want to restart with slony schema included in the dump, you may try with
the repair config facility :
http://www.slony.info/documentation/stmtrepairconfig.html

Regards,


- -- 
Stéphane Schildknecht
Loxodata
Contact régional PostgreSQL

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4lzP4ACgkQA+REPKWGI0F2uwCghtEgpEXIhAxl/Isk9Q9sA4/n
LjAAoLNg4qlUxyl1kTB/ASyO7QeCjVPN
=6Z3/
-----END PGP SIGNATURE-----


More information about the Slony1-general mailing list