Good day, Prospective noob here, trying to get a master-master swap going on several Postgres databases. I think we're hitting the issue Rafik reported in July:

https://mail.endcrypt.com/pipermail/bucardo-general/2012-July/001498.html

I'm wondering if this made it into the bugzilla (if so I can't tell which one it is) and if anyone has made progress on it. I think I'm getting close to tracking it down but first wanted to ask if someone could please sanity check my config? I'm first assuming we're driving it wrong. Any advice appreciated.

Details: If I rig for only one DB, they swap sync fine. If I add a second db, things go astray as below. 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.

   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


Thanks!


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.

_______________________________________________
Bucardo-general mailing list
[email protected]
https://mail.endcrypt.com/mailman/listinfo/bucardo-general

Reply via email to