This reverts commit
25973f4b5ba797568467632b79e8129ffe007f49. I'm pretty sure
this was not the problem, since I have syncs that *do* work with this
approach.
The problem I'm having with a NOTIFY being ignored is that the database in
question is used in two db groups, once as a source, another as a target. As
it validates, it finds the target record before the source, and stores that
one away. Then the autokick is ignored, because Bucardo thinks the DB is a
target, not a source. Working on a fix for that now.
$x = $self->{sdb}{$dbname};
next if $x->{role} ne 'source';
- $self->db_listen($x->{dbh}, $l, $dbname, 1);
+ $self->db_listen($x->{dbh}, $l, $dbname, 0);
$x->{dbh}->commit();
}
}
$x->{dbh}->commit();
if ($s->{autokick}) {
my $l = "kick_sync_$syncname";
- $self->db_unlisten($x->{dbh}, $l, $dbname, 1);
+ $self->db_unlisten($x->{dbh}, $l, $dbname, 0);
$x->{dbh}->commit();
}
}
if ($newschema || $count < 1) {
## We may override this later on with a custom function from bucardo_custom_trigger
## and we may not even use it all, but no harm in creating the stock one here
- my $notice = qq{"bucardo_kick_sync_$syncname"};
+ my $notice = $dbh->{pg_server_version} >= 90000
+ ? qq{bucardo, 'kick_sync_$syncname'}
+ : qq{"bucardo_kick_sync_$syncname"};
$SQL = qq{
CREATE OR REPLACE FUNCTION bucardo."$kickfunc"()
RETURNS TRIGGER