[Bucardo-general] Restarting replication after Postgresql restart.

Ben Allen bsa at lanl.gov
Mon Apr 6 18:33:34 UTC 2009


Try the attached patch. I made it based on Bucardo.pm from 3.0.9. I  
have not tested it though.

Ben

On Apr 6, 2009, at 11:15 AM, Lev Tannen wrote:

> Ben,
>
> Thank you for advice. I tried to apply the patch, but received  error:
>
> [bucardo at devdb2 Bucardo-3.0.9]$ patch <patchText
> patching file Bucardo.pm
> patch: **** malformed patch at line 7: ## We assume this is  
> bucardo_ctl, and that we are in same directory as when called
>
> What would you suggest? I am running version Bucardo-3.0.9
>
> Thank you.
> Lev
>
>
> On Sat, Apr 4, 2009 at 5:03 PM, Ben Allen <bsa at lanl.gov> wrote:
> Lev I'm pretty sure you are experiencing the same problem I was,  
> which was fixed by this patch. Basically Bucardo uses the  
> bucardo_ctl script itself to restart itself when there is a db  
> problem. The problem arises that Bucardo wasn't smart enough to  
> figure out the path of bucardo_ctl and assumed ./bucardo_ctl which  
> in most cases was wrong.
>
> If you are using 3.0.9 or version before this patch was committed I  
> wager to guess this is the problem.
>
> Regards,
>
> Ben
>
> Begin forwarded message:
>
>> From: bucardo-commits at bucardo.org
>> Date: March 10, 2009 1:38:57 PM EDT
>> To: bucardo-commits at bucardo.org
>> Subject: [Bucardo-commits] [Bucardo] Check for executableness on  
>> MCP restart. Thanks to Ben Allen for the patch.
>>
>> Committed by Greg Sabino Mullane <greg at endpoint.com>
>>
>> Check for executableness on MCP restart. Thanks to Ben Allen for  
>> the patch.
>>
>> ---
>> Bucardo.pm |    5 ++++-
>> 1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/Bucardo.pm b/Bucardo.pm
>> index 5c39e68..ad855bf 100644
>> --- a/Bucardo.pm
>> +++ b/Bucardo.pm
>> @@ -1158,7 +1158,10 @@ sub start_mcp {
>>
>> 			## We assume this is bucardo_ctl, and that we are in same  
>> directory as when called
>> 			my $RUNME = $old0;
>> -			$RUNME = "./$RUNME" if index($RUNME,'.')!=0;
>> +			## Check to see if $RUNME is executable as is, before we assume  
>> we're in the same directory
>> +			if (! -x $RUNME) {
>> +				$RUNME = "./$RUNME" if index ($RUNME,'.') != 0;
>> +			}
>> 			$RUNME .= qq{ start "Attempting automatic respawn after MCP  
>> death"};
>> 			$self->glog("Respawn attempt: $RUNME");
>> 			exec $RUNME;
>> -- 
>> 1.6.0.5
>>
>> _______________________________________________
>> Bucardo-commits mailing list
>> Bucardo-commits at bucardo.org
>> https://mail.endcrypt.com/mailman/listinfo/bucardo-commits
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090406/2f594717/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bucardo_ctl_execute.patch
Type: application/octet-stream
Size: 604 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090406/2f594717/attachment.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090406/2f594717/attachment-0001.html 


More information about the Bucardo-general mailing list