From 52939ee1e3de6c1c54df20a2247b76da916e3de2 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Fri, 26 Oct 2012 09:24:11 -0700 Subject: [PATCH] Remove the `do_listen` parameter Per discussion. It was just an alias for `ping`. --- Bucardo.pm | 6 +++--- bucardo | 8 ++------ bucardo.schema | 1 - 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Bucardo.pm b/Bucardo.pm index c5310fe45..95eb4a3cf 100644 --- a/Bucardo.pm +++ b/Bucardo.pm @@ -982,7 +982,7 @@ sub mcp_main { $maindbh->commit(); ## Only certain things can be changed "on the fly" - for my $val (qw/checksecs stayalive do_listen deletemethod status ping + for my $val (qw/checksecs stayalive deletemethod status ping analyze_after_copy vacuum_after_copy targetgroup targetdb onetimecopy lifetimesecs maxkicks rebuild_index/) { $sync->{$syncname}{$val} = $self->{sync}{$syncname}{$val} = $info->{$val}; @@ -6068,7 +6068,7 @@ sub validate_sync { } ## end each goat ## If pinging, listen for a triggerkick on all source databases - if ($s->{ping} or $s->{do_listen}) { + if ($s->{ping}) { my $l = "kick_sync_$syncname"; for my $dbname (sort keys %{ $self->{sdb} }) { $x = $self->{sdb}{$dbname}; @@ -6181,7 +6181,7 @@ sub deactivate_sync { $x->{dbh} ||= $self->connect_database($dbname); $x->{dbh}->commit(); - if ($s->{ping} or $s->{do_listen}) { + if ($s->{ping}) { my $l = "kick_sync_$syncname"; $self->db_unlisten($x->{dbh}, $l, $dbname, 0); $x->{dbh}->commit(); diff --git a/bucardo b/bucardo index 656431e6e..c41e838c6 100755 --- a/bucardo +++ b/bucardo @@ -3861,7 +3861,6 @@ sub add_sync { stayalive stayalive TF null kidsalive kidsalive TF null ping ping TF null - do_listen do_listen TF null checktime checktime interval null status status =active|inactive null source_makedelta source_makedelta =inherits|on|off null @@ -5207,7 +5206,7 @@ sub status_detail { } ## Should be 'yes' or 'no' - for (qw/analyze_after_copy vacuum_after_copy stayalive kidsalive ping do_listen/) { + for (qw/analyze_after_copy vacuum_after_copy stayalive kidsalive ping/) { $s->{$_} = (defined $s->{$_} and $s->{$_}) ? 'yes' : 'no '; } @@ -6975,6 +6974,7 @@ sub upgrade { ['bucardo', 'sync', 'limitdbs'], ['bucardo', 'goat', 'customselect'], ['bucardo', 'sync', 'usecustomselect'], + ['bucardo', 'sync', 'do_listen'], ); my @altered_columns = ( @@ -9758,10 +9758,6 @@ persisent. Defaults to false. Boolean indicating whether or not to ping each database before each sync. Optional. -=item C - -XXX An alias for C? - =item C An interval specifying's the maximum time a sync should go before being diff --git a/bucardo.schema b/bucardo.schema index 7e1cf7549..032c40273 100644 --- a/bucardo.schema +++ b/bucardo.schema @@ -393,7 +393,6 @@ CREATE TABLE bucardo.sync ( copyextra TEXT NOT NULL DEFAULT '', -- e.g. WITH OIDS deletemethod TEXT NOT NULL DEFAULT 'delete', ping BOOLEAN NOT NULL DEFAULT true, -- Are we issuing NOTICES via triggers? - do_listen BOOLEAN NOT NULL DEFAULT false, -- LISTEN for kicks on source/target database if ! ping checktime INTERVAL NULL, -- How often to check if we've not heard anything? status TEXT NOT NULL DEFAULT 'active', -- Possibly CHECK / FK ('stopped','paused','b0rken') makedelta BOOLEAN NULL, -- 2.39.5