Hi everybody,

I have a two nodes master/slave slony replication. It replicates
perfectly. But I have a problem doing the switchover. I have tried
some scripts to do this, but it always cause the same error.

Here is the output:

$ ./switchover
<stdin>:13: PGRES_FATAL_ERROR select "_slony_cluster".moveSet(1, 2);
- server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
<stdin>:13: rollback transaction;

$vi switchover
#!/bin/sh

. config_vars

#!/bin/sh

slonik << _END_
    cluster name = $CLUSTER;
    node 1 admin conninfo = 'dbname=$DBNAME1 host=$HOST1 port=$PORT1
user=$REPLICATIONUSER';
    node 2 admin conninfo = 'dbname=$DBNAME2 host=$HOST2 port=$PORT2
user=$REPLICATIONUSER';

    #
    # lock and move set
    #
    lock set (id=1, origin=1);
    move set (id=1, old origin=1, new origin=2);

    # subscribe set if required
    subscribe set (id=1, provider=2, receiver=1, forward=yes);

_END_
************************

After this, the master database has locked the tables, and I only can
drop the database and start from scratch to test again. When I try to
insert into the Master, it says: ERROR:  Slony-I: Table tellers is
currently locked against updates because of MOVE_SET operation in
progress. And the slave remains being slave. (I'm using pgbench to
test).

Thank you,

Daniel

_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to