[i've tried to subscribe to the new list on
http://lists.slony.info/mailman/listinfo/slony1-general diuble, but the
confirmation email does not arrive; i think i'm simply coming here in
the middle of a site migration... ;) ]
I've to deploy in my organization a database replica for an internal
LAPP application, and clearly i've choosed slony-I.
We are using here Debian, keeping stable (sarge), so postgres 7.4.X.
The real intention was to move after etch, but i need this replica now
and so i've firstly recompiled etch slony1 package for sarge, without
no trouble at all.
So i'm using:
mouse:~# dpkg -l | grep "postgres"
ii postgresql 7.4.7-6sarge4 object-relational SQL database management sy
mouse:~# dpkg -l | grep "slony"
ii slony1-bin 1.2.1-0sarge1 replication system for PostgreSQL
As a debian afecionados the first docs i read was
/usr/share/doc/slony1-bin/README.Debian.gz, that warn to read the docs
and then suggest at least to try the 'perl tools'.
So i've setup a quick testbed, compiled the slon_tools.conf
configuration files and start testing.
I suppose no error done on create the database, create schema, add language
and copy schema on the slave, simple tasks.
Then i do a slonik_init_cluster | slonik :
mouse:~# slonik_init_cluster
# INIT CLUSTER
cluster name = test;
node 1 admin conninfo='host=mouse.sv.lnf.it dbname=test user=postgres
port=5432';
node 2 admin conninfo='host=eli.ud.lnf.it dbname=test user=postgres port=5432
password=test';
init cluster (id = 1, comment = 'Node 1 - [EMAIL PROTECTED]');
# STORE NODE
store node (id = 2, event node = 1, comment = 'Node 2 - [EMAIL PROTECTED]');
echo 'Set up replication nodes';
# STORE PATH
echo 'Next: configure paths for each node/origin';
echo 'Replication nodes prepared';
echo 'Please start a slon replication daemon for each node';
and slonik_create_set set1 | slonik :
mouse:~# slonik_create_set set1
cluster name = test;
node 1 admin conninfo='host=mouse.sv.lnf.it dbname=test user=postgres
port=5432';
node 2 admin conninfo='host=eli.ud.lnf.it dbname=test user=postgres port=5432
password=test';
# TABLE ADD KEY
# CREATE SET
try {
create set (id = 1, origin = 1, comment = 'Set 1 for test');
} on error {
echo 'Could not create subscription set 1 for test!';
exit -1;
}
# SET ADD TABLE
echo 'Subscription set 1 created';
echo 'Adding tables to the subscription set';
set add table (set id = 1, origin = 1, id = 1,
full qualified name = 'public.assi_accogl_dimiss',
comment = 'Table public.assi_accogl_dimiss with primary key');
echo 'Add primary keyed table public.assi_accogl_dimiss';
set add table (set id = 1, origin = 1, id = 2,
full qualified name = 'public.assi_trattamenti',
comment = 'Table public.assi_trattamenti with primary key');
echo 'Add primary keyed table public.assi_trattamenti';
set add table (set id = 1, origin = 1, id = 3,
full qualified name = 'public.assi_impegnative',
comment = 'Table public.assi_impegnative with primary key');
echo 'Add primary keyed table public.assi_impegnative';
# SET ADD SEQUENCE
echo 'Adding sequences to the subscription set';
echo 'All tables added';
the commmand execute with no error at all, but the first strangness are
that on master database i can see the trigger that 'log' data, on the
slave there's no trigger that prevent write operation (i've read about
it on the docs).
Second strangness: reading on the docs for the 'manual mode' i suspect
that the missin of a 'STORE PATH' sections it is not good...
Doing that i've started the slon daemons on master and slave, and i can
see that communicate each other (via tcpdump or seen in the log
2007-03-07 17:06:13 CET DEBUG2 syncThread: new sl_action_seq 1 - SYNC 36
2007-03-07 17:06:13 CET DEBUG2 localListenThread: Received event 2,36 SYNC
).
So after that the only pass missed was the subscribing, so i've done a
slonik_subscribe_set set1 node2 | slonik :
mouse:~# slonik_subscribe_set set1 node2
cluster name = test;
node 1 admin conninfo='host=mouse.sv.lnf.it dbname=test user=postgres
port=5432';
node 2 admin conninfo='host=eli.ud.lnf.it dbname=test user=postgres port=5432
password=test';
try {
subscribe set (id = 1, provider = 1, receiver = 2, forward = yes);
}
on error {
exit 1;
}
echo 'Subscribed nodes to set 1';
and i've seen on the *slave* log (nothing on master log):
2007-03-07 16:52:04 CET DEBUG2 localListenThread: Received event 1,13
SUBSCRIBE_SET
2007-03-07 16:52:04 CET DEBUG2 localListenThread: Received event 1,14
ENABLE_SUBSCRIPTION
but now if i add some data to the table, i see nothing on the salve,
and nothing on the logs.
What i'm missing?
--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/
Polo FVG - Via della Bontà , 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general