[Bucardo-general] bucardo master master doesn't sync

Sebastiano Laini Sebastiano.Laini at BuchananComputing.co.uk
Tue Jun 4 11:18:01 UTC 2019


Hi all,

I'm new with bucardo and I'm trying to setup a postgres master master configuration but I cannot kick the sync when I update the primary DB.

I've used 2 website to setup PG 9.3 with Bucardo.

https://icicimov.github.io/blog/database/PostgreSQL-DB-replication-with-Bucardo/


yum install postgresql93-plperl perl-DBIx-Safe perl-devel
yum -y install perl-DBD-Pg perl-Readonly perl-Readonly-XS perl-Sys-Syslog perl-Test-Simple perl-boolean perl-Version
cd /usr/local/src
mkdir bucardo
cd bucardo
wget http://bucardo.org/downloads/Bucardo-5.5.0.tar.gz
tar -xzvf Bucardo-5.5.0.tar.gz
cd Bucardo-5.5.0
perl Makefile.PL
make
make test
make install

mkdir -p /var/run/bucardo

bucardo install

ALTER USER bucardo WITH ENCRYPTED PASSWORD '<bucardo-password>';


https://github.com/SKletsov/Master-Master-Repication_on_PostgreSQL/blob/master/README.md

nano /var/lib/pgsql/9.3/data/postgresql.conf

uncomment: listen_addresses = '*'

nano /var/lib/pgsql/9.3/data/pg_hba.conf

PG_Node_1

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                trust
#host    replication     postgres        127.0.0.1/32            trust
#host    replication     postgres        ::1/128                 trust

host    all             bucardo         127.0.0.1/32            md5
host    all             bucardo         PG_Node_2/32                        md5


PG_Node_2

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                trust
#host    replication     postgres        127.0.0.1/32            trust
#host    replication     postgres        ::1/128                 trust

host    all             all             PG_Node_1/32            md5
host    all             bucardo         127.0.0.1/32            md5
host    all             bucardo         PG_Node_1/32            md5


service postgresql-9.3 restart

mkdir /var/log/bucardo
touch /var/log/bucardo/log.bucardo

bucardo start


bucardo add database moredb dbname=DBNAME dbhost= PG_Node_1 dbuser=bucardo dbpass=bucardo
bucardo add database moredb2 dbname= DBNAME dbhost= PG_Node_2 dbuser=bucardo dbpass=bucardo

(at this point I have an error because I didn't restore the original DB to the other server so I restore it, and it works)

bucardo add table all -db=moredb -herd=moredb_herd

bucardo add sequence all -db=moredb -herd=moredb_herd

bucardo add dbgroup moredb_servers
bucardo add dbgroup moredb_servers moredb:source
bucardo add dbgroup moredb_servers moredb2:source

bucardo add sync moredb_sync herd=moredb_herd dbs=moredb_servers

bucardo list all

bucardo restart

bucardo status

At this point it say that the state is good but if I add some new records it doesn't sync and the "last good" doesn't change the time

Any help?

Sebastiano Laini
Web Developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://bucardo.org/pipermail/bucardo-general/attachments/20190604/2824a0b8/attachment-0001.html>


More information about the Bucardo-general mailing list