[Bucardo-general] Upgrading Bucardo 3.9 to Bucardo 4.2.0

Lev Tannen levtannen at gmail.com
Mon Oct 5 20:41:48 UTC 2009


Hello,

I just successfully upgraded my Bucardo 3.9 to Bucardo 4.2.0 on Linux
machine and want to share my experience.

I have two Linux machines with Postgresql 8.3.6 running on them. I use
Bucardo to provide master to master replication.
To do upgrading I have followed the procedure outlined in
http://bucardo.org/wiki/Bucardo/Upgrade.
*Upgrading Bucardo*

*To upgrade Bucardo, install the new Bucardo file by downloading the latest
version <http://bucardo.org/wiki/Bucardo/Download>, and then running: *

* perl Makefile.PL
 make
 make install
*

*Then upgrade your existing Bucardo database by running: *

* bucardo_ctl upgrade
*

*This will modify your existing Bucardo schema as needed. You should also
validate all your syncs by running: *

* bucardo_ctl validate all*

Bellow are problems that I encountered during upgrading and their solutions
that worked for me.

1. You have to have root privileges. I tried to do upgrading under bucardo
privileges and failed when make install tried to install perl modules into
the perl directory
.
2.  By default the bucardo administrative files are installed into the
/usr/bucardo directory. It is inconvenient, because you need to switch to
root every time you want to restart bucardo. (One can probably use sudo, but
it still inconvenient. Greg gave me advice to use a statement
INSTALL_BUCARDODIR=/home/greg/testdir perl Makefile.PL  (all in the same
line).
It worked.

3.  bucardo_ctl upgrade failed. To make it working I had to manually modify
the bucardo_schema as following:
a. Create a sequence audit_pid_id_seq;
b. Create a table upgrade_log and
c. Create a function populate_child_q_table().

SQL statements for the above actions are  found in the file bucardo.schema
in the Bucardo-4.2.0 directory.

4. bucardo_ctl start 'test' failed without any warnings in the screen, but
with a warming message in the log:
MCP Warning: Killed (line 1710): Table agency has no pkey or qpkey - do you
need to run validate_goat on it?  ("address" is my table name).
The reason for the failure was that in the table goat in the new version
contained a field qpkey that did not exist in the previous version. And that
field should not be null.

The upgrading procedure on the previous steps create the field, but left it
empty. This field cannot be filled in manually.
The solution, that I found was to execute a statement "update goat set
pkey=pkey;". The field qpkey in all rows was filled automatically.


That was it. After these changes "bucardo_ctl start 'test'" successfully
started bucardo.
 I found  those set of changes by experiment and  cannot guaranty that this
is a complete set of changes necessary to upgrade bucardo 3.9 to bucardo
4.2.0, but it worked for me.

Lev Tannen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20091005/ac208333/attachment.html 


More information about the Bucardo-general mailing list