marmu mu at forsa.de
Thu Jul 21 04:52:32 PDT 2011
Hello Guys,

at first, thanks Stéphane for your input. But after getting some more errors
and not finding any suitable solutions, I already started from scratch. I
dropped both databases and did the following acording to the slony
documentation:
http://pastebin.com/RTJ5c4kY

The problem now is as follows (extract from the pastebin above): 
...
fquest-b1:/etc/slony-I # pgbench -i -s 1 -U $PGBENCHUSER -h $MASTERHOST
$MASTERDBNAME
NOTICE:  table "pgbench_branches" does not exist, skipping
NOTICE:  table "pgbench_tellers" does not exist, skipping
NOTICE:  table "pgbench_accounts" does not exist, skipping
NOTICE:  table "pgbench_history" does not exist, skipping
...
fquest-b1:/etc/slony-I # psql -U $PGBENCHUSER -h localhost -d $MASTERDBNAME
-c "begin; alter table
history add column id serial; update history set id =
nextval('history_id_seq'); alter table history add primary key(id);
commit"
ERROR:  relation "history" does not exist

Why isn't the relation "history" created? Any ideas? I am really stuck here.
Thanks again in advance.

Cheers, 
Marcus



"Stéphane A. Schildknecht"-3 wrote:
> 
> -----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-----
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
> 
> 

-- 
View this message in context: http://old.nabble.com/Is-it-possible-to-add-slony-to-an-existing-DB-%28imported-from-old-slony-server%29--tp32092506p32106787.html
Sent from the Slony-I -- General mailing list archive at Nabble.com.



More information about the Slony1-general mailing list