Thu Nov 22 04:52:05 PST 2007
- Previous message: [Slony1-general] Patch to have a defined table lock order
- Next message: [Slony1-general] Re: PB with Failover and switchover
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I am using Slony 1.2.12 with Postgresql 8.2.5
I have 2 nodes replicating a small database.
The replication works fine but when I try to use failover and switchover I
got an error.
Failover and switchover were working perfectly before but now I can't use
these features anymore, even I downgrade to Slony 1.2.9.
Can you please help to find the source of this error?
Thanks in advance
For the Failover, here is my script :
#########################
cluster name =3D my_cluster;
node 1 admin conninfo=3D'host=3Dnode1 dbname=3Dbdd user=3Dslony port=3D543=
2';
node 2 admin conninfo=3D'host=3Dnode2 dbname=3Dbdd user=3Dslony port=3D543=
2';
try {
failover (id =3D 1, backup node =3D 2);
} on error {
echo 'Failure to fail node 1 over to 2';
exit 1;
}
echo 'Replication sets originating on 1 failed over to 2';
try {
drop node (id =3D 1, event node =3D 2);
} on error {
echo 'Failed to drop node 1 from cluster';
exit 1;
}
echo 'dropped node 2 cluster';
#########################
And here is the error message that appears in my console ( there is nothing
in log file):
#########################
<stdin>:6: PGRES_FATAL_ERROR select "_my_cluster".failedNode(1, 2); -
ERROR: relation "PartInd_my_cluster_sl_log_2-" already exists
CONTEXT: SQL statement "create index "PartInd_my_cluster_sl_log_2-node-2"
on "_my_cluster".sl_log_2 USING btree(log_xid "_my_cluster".xxid_ops) where
(log_origin =3D 2);"
PL/pgSQL function "addpartiallogindices" line 34 at execute statement
SQL statement "SELECT "_my_cluster".addPartialLogIndices()"
PL/pgSQL function "failednode" line 158 at perform
<stdin>:8: Failure to fail node 1 over to 2
#########################
When I try to do a switchover using this script :
#########################
cluster name =3D my_cluster;
node 1 admin conninfo=3D'host=3Dnode1 dbname=3Dbdduser=3Dslony port=3D5432';
node 2 admin conninfo=3D'host=3Dnode2 dbname=3Dbdd user=3Dslony port=3D5432=
';
echo 'Moving set 1 to node 2';
lock set (id=3D1, origin=3D1);
echo 'Set locked';
wait for event (origin =3D 1, confirmed =3D 2);
echo 'Moving set';
move set (id=3D1, old origin=3D1, new origin=3D2);
echo 'Set moved - waiting for event to be confirmed by node 2';
wait for event (origin =3D 1, confirmed =3D 2);
echo 'Confirmed';
#########################
The slonik script output is locked on "<stdin>:11: Set moved - waiting for
event to be confirmed by node 2" and I got an error message equivalent to
the one I got for failover but in log file. I also
#########################
"select "_hwi06intrsifoisusgbd1_2_hwi06intrsifoisusgbd2".cleanupNodelock();
insert into "_hwi06intrsifoisusgbd1_2_hwi06intrsifoisusgbd2".sl_nodelock
values ( 2, 0, "pg_catalog".pg_backend_pid()); " - ERROR: duplicate key
violates unique constraint "sl_nodelock-pkey"
#########################
On node1, the sl_nodelock table contains :
1 0 21582
2 1 21682
2 2 21684
2 3 21865
On node2, the sl_nodelock table contains :
1 1 25103
2 0 25164
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20071122/=
fac84a21/attachment-0001.html
- Previous message: [Slony1-general] Patch to have a defined table lock order
- Next message: [Slony1-general] Re: PB with Failover and switchover
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list