On Tue, May 31, 2016 at 08:16:50AM +0000, Videanu Adrian wrote: > Hi all, > I have a 4 master bucardo setup which works as it should, only that sometimes > i get this kind of messages in log: > Any idea why this is happening ?
> ... VAC was killed at line 7727: DBD::Pg::st pg_result failed: ERROR: cannot
> execute DELETE in a read-only transaction
I think this is a bug. While we go out of our way to set transaction isolation
when connecting
to sources and targets, the VAC has no such check. Obviously, it needs to
override read_only
if it is set. Try this patch:
diff --git a/Bucardo.pm b/Bucardo.pm
index 1f8870e..60f04a7 100644
--- a/Bucardo.pm
+++ b/Bucardo.pm
@@ -5787,6 +5787,12 @@ sub connect_database {
$dbh->commit();
}
+ ## If this is a vacuum process, make sure it can write to the database!
+ if ('VAC' eq $self->{logprefix}) {
+ $dbh->do(qq{SET default_transaction_read_only = off});
+ $dbh->commit();
+ }
+
return $backend, $dbh;
} ## end of connect_database
--
Greg Sabino Mullane [email protected]
End Point Corporation
PGP Key: 0x14964AC8
signature.asc
Description: PGP signature
_______________________________________________ Bucardo-general mailing list [email protected] https://mail.endcrypt.com/mailman/listinfo/bucardo-general
