[Bucardo-general] another noob, tangled in multiple databases
Mitchell Perilstein
Mitchell.Perilstein at trueposition.com
Thu Jan 31 17:37:10 UTC 2013
Good day! Prospective user here, trying to get a master-master swap
going on several databases. If I rig for only one DB, they swap sync
fine. If I add a second db, things go astray as below. Before I start
dumping the universe, could someone please sanity check my config? I'm
assuming we're driving it wrong.
I've got two solaris 10 boxes with the same PG 9.1 on both sides; each
has a hostname for its peer called remotehost and localhost for
itself. Each box has Bucardo-4.99.6 DBD-Pg-2.19.3 DBI-1.623
DBIx-Safe-1.2.5 and perl v5.8.8. We do this exact same thing on both
boxes:
bucardo install --batch --log-destination=/tpdata/lg/logs
--debugname=replication
bucardo set log_level=debug
bucardo add database source_sg host=localhost user=tpadmin
db=TPSignalingGateway
bucardo add database --force target_sg host=remotehost user=tpadmin
db=TPSignalingGateway
bucardo add table connidtable db=source_sg herd=sgherd
bucardo add dbgroup sggroup source_sg:source target_sg:target
bucardo add database source_lg host=localhost user=tpadmin
db=TPLocationGateway
bucardo add database --force target_lg host=remotehost user=tpadmin
db=TPLocationGateway
bucardo add table transactionid db=source_lg herd=lgherd
bucardo add table smlcseqnum db=source_lg herd=lgherd
bucardo add dbgroup lggroup source_lg:source target_lg:target
bucardo start --log-destination=/tpdata/lg/logs --debug
--no-exit-on-nosync
bucardo add sync sg_sync herd=sgherd conflict_strategy=latest
dbs=sggroup
bucardo add sync lg_sync herd=lgherd conflict_strategy=latest
dbs=lggroup
bucardo activate sync sg_sync
bucardo activate sync lg_sync
at this point we have this, which is already wrong:
PID of Bucardo MCP: 17836
Name State Last good Time Last I/D Last
bad Time
=========+==================+============+=======+===========+===========+=======
lg_sync | No records found | | | | |
sg_sync | No records found | | | | |
If I stop bucardo and restart, I get this crash in Bucardo::validate_sync().
(17874) [Thu Jan 31 12:16:57 2013] MCP Inspecting target table
"public.connidtable" on database "target_lg"
(17874) [Thu Jan 31 12:16:57 2013] MCP Warning: Killed (line 5970):
DBD::Pg::st execute failed: ERROR: relation "public.connidtable" does
not exist at /tpapp/tpdb/lib/perl5/Bucardo.pm line 5959.
Sticking some dumpers in there, just above that line, it turns out
$self->{sdb} contains all four db's: source_lg target_lg source_sg
target_sg; where I really expected only the source and target for the
sync in question. The checkcols prepare tried to hit a table in the
wrong database.
Any advice appreciated.
bash-3.2# bucardo list db
Database: source_lg Status: active Conn: psql -p -U tpadmin -d
TPLocationGateway -h localhost
Database: source_sg Status: active Conn: psql -p -U tpadmin -d
TPSignalingGateway -h localhost
Database: target_lg Status: active Conn: psql -p -U tpadmin -d
TPLocationGateway -h tppeervirt
Database: target_sg Status: active Conn: psql -p -U tpadmin -d
TPSignalingGateway -h tppeervirt
bash-3.2# bucardo list herd
Relgroup: lgherd DB: source_lg Members: public.smlcseqnum,
public.transactionid
Used in syncs: lg_sync
Relgroup: sgherd DB: source_sg Members: public.connidtable
Used in syncs: sg_sync
bash-3.2# bucardo list sync
Sync: lg_sync Relgroup: lgherd [Active]
DB group lggroup: source_lg (source) target_lg (target)
Sync: sg_sync Relgroup: sgherd [Active]
DB group sggroup: source_sg (source) target_sg (target)
bash-3.2# bucardo list table
1. Table: public.connidtable DB: source_sg PK: type (int2)
Syncs: sg_sync
3. Table: public.smlcseqnum DB: source_lg PK: smlcid (bytea)
Syncs: lg_sync
2. Table: public.transactionid DB: source_lg PK: type (int2)
Syncs: lg_sync
Confidentiality Notice: This e-mail (including any attachments) is intended only for the recipients named above. It may contain confidential or privileged information and should not be read, copied or otherwise used by any other person. If you are not a named recipient, please notify the sender of that fact and delete the e-mail from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130131/417c267a/attachment.html>
More information about the Bucardo-general
mailing list