[Bucardo-general] Restarting replication after Postgresql restart.

Ben Allen bsa at lanl.gov
Mon Apr 13 16:38:14 UTC 2009


No you didn't miss anything. Greg hasn't tagged a release since 3.0.7  
for whatever reason, so what I'm saying is literally use the latest  
development version. I know that doesn't really sound "right" but I'd  
say the current code is stable, but obviously I would test it in your  
environment fully before putting into production. The other option  
would be to get Greg to tag a release that you could stay at.

Ben

On Apr 9, 2009, at 4:47 PM, Lev Tannen wrote:

> Hi Ben,
> Thank you for explanation.
> I feel I ask too much. But the more I learn the less I understand.
>
> I run git clone. I run "git tag -l" and got only two tags 3.0.6 and  
> 3.0.7. I run "git branch" and received only "* master", I run "git  
> remote" and got "original".   In one of the previous emails you  
> suggested to use the version 3.2.5. But I do not see even  the tag  
> 3.0.9. Where is it? I do not think it is correct to use a  
> development version in production. I expect to see something named  
> like "last stable version", "beta version" and so on. But there is  
> nothing close.
> Did I missed something?
>
> Thank you,
> Lev
>
>
> On Thu, Apr 9, 2009 at 2:46 PM, Ben Allen <bsa at lanl.gov> wrote:
> Running "git clone http://bucardo.org/bucardo.git" will clone the  
> repository to bucardo in the current directory. This bucardo folder  
> will contain the latest code. You can simply use it as you have used  
> the downloaded version. If you see new updates being pushed to the  
> repository, run "git pull" inside the bucardo folder. This will  
> download the latest version. If you've made any changes to your  
> local copy it will try to merge those changes. If it fails, you'll  
> have to manually merge the files. There's also the concept of  
> committing changes you make locally. Running "git commit -a" will  
> save your changes just to your local clone of the repo. For more  
> info checkout: http://git-scm.com/documentation
>
> Ben
>
> On Apr 7, 2009, at 4:26 PM, Lev Tannen wrote:
>
>> Hi Ben,
>>
>> I finally figured out what was wrong. It was a verb "forcestart"  
>> that Bucardo.pm used to restart itself that caused athe problem.  
>> Bucardo_ctl did not recognize that verb. When I changed it to  
>> "start" everything went in place.
>>
>> I think I have to switch to a version newer then 3.0.9. The problem  
>> is it is the only version I could find. The article in http://bucardo.org 
>>  references this version.  It also references a GIT repository, but  
>> that GIT repository contains only the master version. So I am  
>> completely lost.
>> Could you please provide me with information on how to access the  
>> Bucardo repository, so I could see what versions exists, what is  
>> the latest stable version and so on.
>> Thank you,
>> Lev
>>
>> On Tue, Apr 7, 2009 at 10:21 AM, Lev Tannen <levtannen at gmail.com>  
>> wrote:
>> Hi Ben,
>> I run Bucardo as ./bucardo_ctl from the /home/bucardo/bucardo3-0-9  
>> directory.
>>
>>
>> About the version 3-0-9, I use it because it is the only version  
>> referred on bucardo.org.
>> I am not familiar with GIT. I have installed GIT on my computer and  
>> issued a command git clone http://bucardo.org/bucardo.git, but what  
>> has been downloaded looks just as one version of Bucardo and I do  
>> not know which one. "git branch" lists only one branch:  * master.   
>> Could you please refer me to some manual so I will be able to use  
>> git more productively.
>>
>> Thank you,
>> Lev
>> http://bucardo.org/bucardo.git
>>
>> On Mon, Apr 6, 2009 at 5:31 PM, Ben Allen <bsa at lanl.gov> wrote:
>> 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/20090413/a651a6cf/attachment.html 


More information about the Bucardo-general mailing list