[Bucardo-general] Restarting replication after Postgresql restart.

Ben Allen bsa at lanl.gov
Mon Apr 6 21:31:38 UTC 2009


Hi Lev,

Do you run bucardo_ctl when you are in the /home/bucardo/bucardo3-0-9  
directory? So "./bucardo_ctl", or do you run it like  "/home/bucardo/ 
bucardo3-0-9/bucardo_ctl"

As long as the bucardo user can access the database with however you  
have setup permissions to the database there should be no problem.  
Essentially all that bucardo does to restart itself after a database  
failure is call bucardo_ctl start from itself.

I don't see anything wrong with the bucardo.pm you attached. Have you  
considered using the latest checkout version? Bucardo 3.0.9 is quite  
old. The current version in Git is 3.2.5.

Ben

On Apr 6, 2009, at 3:53 PM, Lev Tannen wrote:

> Ben,
>
> I successfully applied a patch, but it looks it does not work.
> When I restarted postgres, bucardo_ctl issued an error:
>
> [bucardo at devdb2 logs]$ FATAL:  terminating connection due to  
> administrator command
> Sync "Attempting automatic respawn after MCP death" does not appear  
> to exist
>
> The bucardo log file gave me practically the same message:
> Sync "Attempting automatic respawn after MCP death"
>
> It waited for several minutes and restored the normal operation  
> except for lucking direct respond to update.  When I restarted  
> bucardo (bucardo_ctl stop/start) direct respond has been restored.
>
>  I see two possibilities: either I applied the patch incorrectly, or  
> the patch does not work in my case.
> I have one complicating factor: I run bucardo_ctl from the /home/ 
> bucardo/bucardo3-0-9 directory under the user bucardo, but  
> Postgresql is run from /usr/local/pgsql/bin directory under the user  
> postgres. Could this explain why bucardo cannot restore a normal  
> operation?
>
> I am attaching the patched bucardo.pm file.
>
> Thank you for any advise.
> Lev Tannen
>
>
>
> On Mon, Apr 6, 2009 at 2:33 PM, Ben Allen <bsa at lanl.gov> wrote:
> 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
>>
>>
>
>
> _______________________________________________
> Bucardo-general mailing list
> Bucardo-general at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/bucardo-general
>
>
> <Bucardo.pm>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090406/5effeb79/attachment-0001.html 


More information about the Bucardo-general mailing list