Fiel Cabral e4696wyoa63emq6w3250kiw60i45e1
Mon Feb 14 16:45:47 PST 2005
This is the output of the slonik commands below:

<stdin>:4: SWITCHOVER BEGIN
<stdin>:5: TRY: lock set
<stdin>:12: ERROR: lock set
], STDERR: [<stdin>:7: PGRES_FATAL_ERROR select "<clustername>".lockSet(1);
select "<clustername>".getMaxXid();  - ERROR:  Slony-I: set 1 is already locked

The exit status was 10. 

-----BEGIN SLONIK COMMANDS-----

echo 'SWITCHOVER BEGIN';
try {
  echo 'TRY: lock set';
  lock set (id = 1, origin = $old_master_node);
}
on success {
  echo 'SUCCESS: lock set';
}
on error {
  echo 'ERROR: lock set';
  exit 10;
}
echo 'wait for event';
wait for event (origin = $old_master_node, confirmed =
$new_master_node, timeout = $TIMEOUT);
try {
  echo 'TRY: move set';
  move set (id = 1, old origin = $old_master_node, new origin =
$new_master_node);
}
on success {
  echo 'SUCCESS: move set';
}
on error {
  echo 'ERROR: move set';
  unlock set (id = 1, origin = $old_master_node);
  exit 11;
}
echo 'wait for event';
wait for event (origin = $old_master_node, confirmed =
$new_master_node, timeout = $TIMEOUT);
echo 'SWITCHOVER END';

-----END SLONIK COMMANDS-----

The weird thing is that <clustername>.sl_node and <clustername>.sl_set
show that the set origin was moved and that the switchover did succeed
even though the script failed.

Does a move set ever occur automatically after a lock set? My script
didn't do the move set and yet it happened.

I have three databases and all of them have a replication set with ID
= 1. Should replication set IDs be unique across different databases?

Thank you for any hints as to why the move set happened.

-Fiel Cabral


More information about the Slony1-general mailing list