When scanning for errors, no need to keep scanning once we find an interesting one...
authorGreg Sabino Mullane <greg@endpoint.com>
Wed, 24 Oct 2012 03:39:16 +0000 (23:39 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Wed, 24 Oct 2012 03:39:16 +0000 (23:39 -0400)
Bucardo.pm

index 8c5a84e6b123ece3e7ec5e01241070dbb71a4741..2d4fb881b6ef974bb3b3450452b73dd724195000 100644 (file)
@@ -2160,11 +2160,13 @@ sub start_kid {
                if ($state eq '40P01' and $x->{dbtype} eq 'postgres') {
                    $msg .= $self->get_deadlock_details($dbh, $msg);
                    $moresub = ' (deadlock)';
+                   last;
                }
                elsif ($state eq '40001' and $config{kid_serial_sleep}) {
                    $gotosleep = $config{kid_serial_sleep};
                    $moresub = ' (serialization)';
                    $self->glog("Could not serialize, sleeping for $gotosleep seconds", LOG_TERSE);
+                   last;
                }
             }
         }