Tue Jan 2 09:16:00 PST 2007
- Previous message: [Slony1-commit] By cbbrowne: Per Mark Stosberg...
- Next message: [Slony1-commit] By cbbrowne: Code for long running transaction check wasn't listing node
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Per Mark Stosberg...
- Added inline documentation to these scripts
- slonik_create_set.pl has improved diagnostics, listing the valid set names
Tags:
----
REL_1_2_STABLE
Modified Files:
--------------
slony1-engine/tools/altperl:
slonik_create_set.pl (r1.3.2.1 -> r1.3.2.2)
slonik_drop_node.pl (r1.1.4.1 -> r1.1.4.2)
slonik_drop_set.pl (r1.1.4.1 -> r1.1.4.2)
slonik_uninstall_nodes.pl (r1.1.4.1 -> r1.1.4.2)
-------------- next part --------------
Index: slonik_drop_set.pl
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slonik_drop_set.pl,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Ltools/altperl/slonik_drop_set.pl -Ltools/altperl/slonik_drop_set.pl -u -w -r1.1.4.1 -r1.1.4.2
--- tools/altperl/slonik_drop_set.pl
+++ tools/altperl/slonik_drop_set.pl
@@ -13,12 +13,24 @@
GetOptions("config=s" => \$CONFIG_FILE,
"help" => \$SHOW_USAGE);
-my $USAGE =
+my $USAGE = <<EOF
"Usage: drop_set [--config file] set#
Drops a set.
-";
+Much as with DROP NODE, this leads to Slony-I dropping the Slony-I triggers on
+the tables and restoring "native" triggers. One difference is that this takes
+place on all nodes in the cluster, rather than on just one node. Another
+difference is that this does not clear out the Slony-I cluster's namespace, as
+there might be other sets being serviced.
+
+This operation is quite a bit more dangerous than DROP NODE, as there isn't the
+same sort of "failsafe." If you tell DROP SET to drop the wrong set, there
+isn't anything to prevent potentially career-limiting "unfortunate results."
+Handle with care...
+
+EOF
+;
if ($SHOW_USAGE) {
print $USAGE;
Index: slonik_drop_node.pl
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slonik_drop_node.pl,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Ltools/altperl/slonik_drop_node.pl -Ltools/altperl/slonik_drop_node.pl -u -w -r1.1.4.1 -r1.1.4.2
--- tools/altperl/slonik_drop_node.pl
+++ tools/altperl/slonik_drop_node.pl
@@ -18,6 +18,20 @@
Drops a node.
+This will lead to Slony-I dropping the triggers (generally that deny the
+ability to update data), restoring the \"native\" triggers, dropping the
+schema used by Slony-I, and the slon process for that node terminating
+itself.
+
+As a result, the database should be available for whatever use your
+application makes of the database.
+
+This is a pretty major operation, with considerable potential to cause
+substantial destruction; make sure you drop the right node!
+
+The operation will fail if there are any nodes subscribing to the node
+that you attempt to drop, so there is a bit of a failsafe to protect
+you from errors.
";
if ($SHOW_USAGE) {
Index: slonik_create_set.pl
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slonik_create_set.pl,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -Ltools/altperl/slonik_create_set.pl -Ltools/altperl/slonik_create_set.pl -u -w -r1.3.2.1 -r1.3.2.2
--- tools/altperl/slonik_create_set.pl
+++ tools/altperl/slonik_create_set.pl
@@ -31,8 +31,14 @@
require $CONFIG_FILE;
my ($set) = @ARGV;
+
+die $USAGE unless $set;
$SET_ID = get_set($set);
unless ($SET_ID) {
+ my $possible_sets = join "\n\t", keys %$SLONY_SETS;
+ print "No set was found with the name provided. Possible valid names include:\n\t"
+ . $possible_sets . "\n\n"
+ . "New sets may be defined in your slon_tools.conf file\n\n";
die $USAGE;
}
Index: slonik_uninstall_nodes.pl
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slonik_uninstall_nodes.pl,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Ltools/altperl/slonik_uninstall_nodes.pl -Ltools/altperl/slonik_uninstall_nodes.pl -u -w -r1.1.4.1 -r1.1.4.2
--- tools/altperl/slonik_uninstall_nodes.pl
+++ tools/altperl/slonik_uninstall_nodes.pl
@@ -18,6 +18,15 @@
Removes Slony configuration from all nodes in a cluster.
+Restores all tables to the unlocked state, with all original user
+triggers, constraints and rules, eventually added Slony-I specific
+serial key columns dropped and the Slony-I schema dropped. The node
+becomes a standalone database. The data is left untouched.
+
+The difference between UNINSTALL NODE and DROP NODE is that all
+UNINSTALL NODE does is to remove the Slony-I configuration; it doesn't
+drop the node's configuration from replication.
+
";
if ($SHOW_USAGE) {
- Previous message: [Slony1-commit] By cbbrowne: Per Mark Stosberg...
- Next message: [Slony1-commit] By cbbrowne: Code for long running transaction check wasn't listing node
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list