Wed Dec 17 02:14:14 PST 2008
- Previous message: [Slony1-bugs] [Bug 68] MAKE RPM doesn't work (slony 2.0.0)
- Next message: [Slony1-bugs] Bug in get_pid function in slon-tools.pm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
If someone uses 2 slon daemons on a same box with different clusternames
but one of the clusternames is contained in the other it makes the
get_pid function fail.
For example :
cluster 1 = my_cluster_X
cluster 2 = my_cluster_X_2
the get_pid does not work if you try to start the slon for cluster 1 if
the one for cluster 2 is already started.
Below is a patch that fix it :
diff -Nur slony1-1.2.15/tools/altperl/slon-tools.pm
slony1-1.2.15.new/tools/altperl/slon-tools.pm
--- slony1-1.2.15/tools/altperl/slon-tools.pm 2007-03-21
16:11:34.000000000 +0100
+++ slony1-1.2.15.new/tools/altperl/slon-tools.pm 2008-12-16
15:17:45.000000000 +0100
@@ -117,7 +117,7 @@
my $tpid;
my ($dbname, $dbport, $dbhost) = ($DBNAME[$nodenum], $PORT[$nodenum],
$HOST[$nodenum]);
# print "Searching for PID for $dbname on port $dbport\n";
- my $command = ps_args() . "| egrep \"[s]lon .*$CLUSTER_NAME\" |
egrep \"host=$dbhost dbname=$dbname.*port=$dbport\" | sort -n | awk
'{print \$2}'";
+ my $command = ps_args() . "| egrep \"[s]lon .*$CLUSTER_NAME \" |
egrep \"host=$dbhost dbname=$dbname.*port=$dbport\" | sort -n | awk
'{print \$2}'";
#print "Command:\n$command\n";
open(PSOUT, "$command|");
while ($tpid = <PSOUT>) {
--
Cyril SCETBON
- Previous message: [Slony1-bugs] [Bug 68] MAKE RPM doesn't work (slony 2.0.0)
- Next message: [Slony1-bugs] Bug in get_pid function in slon-tools.pm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-bugs mailing list