]> git.8kb.co.uk Git - slony-i/pgbouncer_follower/commitdiff
Minor changes:
authorglyn <glyn@8kb.co.uk>
Fri, 24 Oct 2014 12:29:00 +0000 (13:29 +0100)
committerglyn <glyn@8kb.co.uk>
Fri, 24 Oct 2014 12:29:00 +0000 (13:29 +0100)
- We should detect changes to server conninfo
- Fixed bug when checking csv sets where we were looking at the wrong value

pgbouncer_follower.pl

index 81f092f9f6a5556912b12b1b3ab70bf01a4558ac..399ca65309ddb0c6b526ffd69d1e7d5a47ff8a37 100755 (executable)
@@ -197,8 +197,8 @@ sub generateConfig {
                             else {
                                 undef @sets_origin;
                             }
-                            if (defined($node->[6])) {
-                                @sets_subscribed =  split(',', $node->[6]);
+                            if (defined($node->[5])) {
+                                @sets_subscribed =  split(',', $node->[5]);
                             }
                             else {
                                 undef @sets_subscribed;
@@ -225,7 +225,7 @@ sub generateConfig {
                                 $target_db = $node->[7];
                                 $target_host = $node->[8];
                                 $target_node_id = $node->[0];
-                                $target_sets = ($node->[6] // $node->[3]);
+                                $target_sets = ($node->[5] // $node->[3]);
                                 $target_is_origin = false;
                             }
                             if (defined($node->[9])) {
@@ -274,9 +274,9 @@ sub checkCluster {
     my $previous_cluster;
     foreach (@g_cluster) {
         if (!$g_origins_only || defined($_->[3])) {
-            $current_cluster = md5_hex(($current_cluster // "") . $_->[0] . $_->[2] . (defined($_->[3]) ? 't' : 'f'));
+            $current_cluster = md5_hex(($current_cluster // "") . $_->[0] . $_->[2] . (defined($_->[3]) ? 't' : 'f') . $_->[6]);
             if ($g_debug) {
-                printLogLn($g_logfile, "DEBUG: Node " . $_->[0] . " detail = " . $_->[2] . (defined($_->[3]) ? 't' : 'f'));
+                printLogLn($g_logfile, "DEBUG: Node " . $_->[0] . " detail = " . $_->[2] . (defined($_->[3]) ? 't' : 'f') . $_->[6]);
             }
         }
     }