From: Greg Sabino Mullane Date: Sat, 19 Oct 2013 01:41:56 +0000 (-0400) Subject: Fix wrong search before inserting to bucardo_delta_targets. X-Git-Tag: 4.99.9~31 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=214df1863197e1750eab57f17a422abd2a815d0a;p=bucardo.git Fix wrong search before inserting to bucardo_delta_targets. This would explain the large number of rows seen in that table in the wild! --- diff --git a/bucardo.schema b/bucardo.schema index ee8dfc314..383369ccb 100644 --- a/bucardo.schema +++ b/bucardo.schema @@ -1535,9 +1535,9 @@ END; my ($relkind,$oid) = @{$sth->fetchall_arrayref()->[0]}; next if $relkind ne 'r'; - my $count = $sthc->execute($oid,$syncname); + my $count = $sthc->execute($oid,"dbgroup $info->{dbs}"); $sthc->finish(); - if ($count != 1) { + if ($count < 1) { $stha->execute($oid,"dbgroup $info->{dbs}"); $dbh->commit(); }