[prev in list] [next in list] [prev in thread] [next in thread]
List: slony1-commit
Subject: [Slony1-commit] By smsimms: Rename slon_pushsql.pl to
From: cvsuser () gborg ! postgresql ! org (CVS User Account)
Date: 2005-02-22 19:02:32
Message-ID: 20050222190229.10003B1C565 () gborg ! postgresql ! org
[Download RAW message or body]
Log Message:
-----------
Rename slon_pushsql.pl to execute_script.pl. The other scripts are
named after slonik commands, so this is more consistent.
Modified Files:
--------------
slony1-engine/doc/adminguide:
adminscripts.sgml (r1.19 -> r1.20)
Added Files:
-----------
slony1-engine/tools/altperl:
execute_script.pl (r1.1)
Removed Files:
-------------
slony1-engine/tools/altperl:
slon_pushsql.pl
-------------- next part --------------
Index: adminscripts.sgml
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/doc/adminguide/adminscripts.sgml,v
retrieving revision 1.19
retrieving revision 1.20
diff -Ldoc/adminguide/adminscripts.sgml -Ldoc/adminguide/adminscripts.sgml -u -w -r1.19 -r1.20
--- doc/adminguide/adminscripts.sgml
+++ doc/adminguide/adminscripts.sgml
@@ -130,6 +130,10 @@
(<emphasis>e.g.</emphasis> - set of tables and sequences) from a
&slony1; cluster.</para>
</sect2>
+<sect2><title>execute_script</title>
+
+<para>Generates Slonik script to push DDL changes to a replication set.</para>
+</sect2>
<sect2><title>failover</title>
<para>Generates Slonik script to request failover from a dead node to some new origin</para>
@@ -175,10 +179,6 @@
only works if those processes are running on the local host, of
course!</para>
</sect2>
-<sect2><title>slon_pushsql</title>
-
-<para>Generates Slonik script to push DDL changes to a replication set.</para>
-</sect2>
<sect2><title>slon_start</title>
<para>This starts a slon daemon for the specified cluster and node, and uses
--- tools/altperl/slon_pushsql.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-#!@@PERL@@
-# $Id: slon_pushsql.pl,v 1.9 2005/02/22 16:51:10 smsimms Exp $
-# Author: Christopher Browne
-# Copyright 2004 Afilias Canada
-
-use Getopt::Long;
-
-# Defaults
-$CONFIG_FILE = '@@SYSCONFDIR@@/slon_tools.conf';
-$SHOW_USAGE = 0;
-
-# Read command-line options
-GetOptions("config=s" => \$CONFIG_FILE,
- "help" => \$SHOW_USAGE);
-
-my $USAGE =
-"Usage: slon_pushsql [--config file] set# node# full_path_to_sql_script_file
-
- Executes the contents of a SQL script file on the specified set and node.
-
- The script only needs to exist on the machine running the slon daemon.
-
-";
-
-if ($SHOW_USAGE) {
- print $USAGE;
- exit 0;
-}
-
-require '@@PGLIBDIR@@/slon-tools.pm';
-require $CONFIG_FILE;
-
-my ($set, $node, $file) = @ARGV;
-if ($set =~ /^(?:set)?(\d+)$/) {
- $set = $1;
-} else {
- print "Invalid set identifier\n\n";
- die $USAGE;
-}
-
-if ($node =~ /^(?:node)?(\d+)$/) {
- $node = $1;
-} else {
- print "Invalid node identifier\n\n";
- die $USAGE;
-}
-
-unless ($file =~ /^\// and -f $file) {
- print "SQL script path needs to be a full path, e.g. /tmp/my_script.sql\n\n";
- die $USAGE;
-}
-
-my $FILE="/tmp/gensql.$$";
-open(SLONIK, ">", $FILE);
-print SLONIK genheader();
-print SLONIK " execute script (\n";
-print SLONIK " set id = $set,\n";
-print SLONIK " filename = '$file',\n";
-print SLONIK " event node = $node\n";
-print SLONIK " );\n";
-close SLONIK;
-run_slonik_script($FILE);
--- /dev/null
+++ tools/altperl/execute_script.pl
@@ -0,0 +1,62 @@
+#!@@PERL@@
+# $Id: execute_script.pl,v 1.1 2005/02/22 19:02:25 smsimms Exp $
+# Author: Christopher Browne
+# Copyright 2004 Afilias Canada
+
+use Getopt::Long;
+
+# Defaults
+$CONFIG_FILE = '@@SYSCONFDIR@@/slon_tools.conf';
+$SHOW_USAGE = 0;
+
+# Read command-line options
+GetOptions("config=s" => \$CONFIG_FILE,
+ "help" => \$SHOW_USAGE);
+
+my $USAGE =
+"Usage: execute_script [--config file] set# node# full_path_to_sql_script_file
+
+ Executes the contents of a SQL script file on the specified set and node.
+
+ The script only needs to exist on the machine running the slon daemon.
+
+";
+
+if ($SHOW_USAGE) {
+ print $USAGE;
+ exit 0;
+}
+
+require '@@PGLIBDIR@@/slon-tools.pm';
+require $CONFIG_FILE;
+
+my ($set, $node, $file) = @ARGV;
+if ($set =~ /^(?:set)?(\d+)$/) {
+ $set = $1;
+} else {
+ print "Invalid set identifier\n\n";
+ die $USAGE;
+}
+
+if ($node =~ /^(?:node)?(\d+)$/) {
+ $node = $1;
+} else {
+ print "Invalid node identifier\n\n";
+ die $USAGE;
+}
+
+unless ($file =~ /^\// and -f $file) {
+ print "SQL script path needs to be a full path, e.g. /tmp/my_script.sql\n\n";
+ die $USAGE;
+}
+
+my $FILE="/tmp/gensql.$$";
+open(SLONIK, ">", $FILE);
+print SLONIK genheader();
+print SLONIK " execute script (\n";
+print SLONIK " set id = $set,\n";
+print SLONIK " filename = '$file',\n";
+print SLONIK " event node = $node\n";
+print SLONIK " );\n";
+close SLONIK;
+run_slonik_script($FILE);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic