Make sure VAC process can write to the database!
authorGreg Sabino Mullane <greg@endpoint.com>
Tue, 7 Jun 2016 17:54:46 +0000 (13:54 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Tue, 7 Jun 2016 17:54:46 +0000 (13:54 -0400)
Bucardo.pm

index 1f8870ea06659a4f2f179109ff64f4675fce87f3..60f04a7992dfa50e5943b1d8349095fe18c842a6 100644 (file)
@@ -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