Don't worry about running pg_cancel if our txn errored out because of serialization...
authorGreg Sabino Mullane <greg@endpoint.com>
Tue, 25 Nov 2014 19:43:42 +0000 (14:43 -0500)
committerGreg Sabino Mullane <greg@endpoint.com>
Tue, 25 Nov 2014 19:43:42 +0000 (14:43 -0500)
Bucardo.pm

index 68b4352f74cac2522cf240e531bfbb02600d94e5..27f9192070cad9dcb0fc4932cd8b1fa03f65ef32 100644 (file)
@@ -4550,6 +4550,10 @@ sub start_kid {
                         if (!$g->{has_exception_code}) {
                             $self->glog("Warning! Aborting due to exception for $S.$T:$pkval Error was $err",
                                         $err =~ /serialize|deadlock/ ? LOG_VERBOSE : LOG_WARN);
+                            ## If this was a serialization error, we will not need to use pg_cancel
+                            if ($err =~ /serialize/) {
+                                $g->{aync_active} = 0;
+                            }
                             die "$err\n";
                         }