[Bucardo-general] Add Sync Error

Ed Snajder ed.snajder at jivesoftware.com
Tue Apr 17 18:23:18 UTC 2012

Hello Bucardo General!

I am hitting an error on a bucardo add sync that I am hoping you can help with. 
I am running 4.99.4 on a dedicated VM with Postgres 9.1. I set up a test replication sync between two other VMs, and everything worked great. 
I set up a new sync, this one between an EC2 instance, connecting over an SSH tunnel, and a 'local' VM. I was able to add the DBs, validate the connection strings, create the herd and dbgroup, but when I "bucardo add sync" I get the following error:

$ bucardo add sync ec2pk herd=testherd dbs=ec2pk
WARNING:  Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=mydb;host=LOCALHOST;port=5435 at line 132.
CONTEXT:  PL/Perl function "validate_sync"
SQL statement "SELECT validate_sync('ec2pk')"
PL/Perl function "validate_sync"
Failed to add sync: DBD::Pg::st execute failed: ERROR:  DBD::Pg::db do failed: ERROR:  syntax error at or near "$1"
LINE 1: ...bucardo.bucardo_truncate_trigger(tablename,sname, $1 ,sync) ...
QUERY:  INSERT INTO bucardo.bucardo_truncate_trigger(tablename,sname, $1 ,sync) VALUES ( $2 ,  $3 ,  $4 ,  $5 )
CONTEXT:  SQL statement in PL/PgSQL function "bucardo_note_truncation" near line 6 at line 132. at line 30.
CONTEXT:  PL/Perl function "validate_sync" at /usr/bin/bucardo line 4068.

my ssh tunnel was pretty straightforward (ssh -f me at ec2host -N -L 5435:ec2host:5432 ), and I didn't have a problem connecting to the DB via psql, I copied it right out of the connection in "bucardo list db" and logged right in. 

This doesn't seem like a bucardo problem as much as it is a connectivity one, but perhaps someone has encountered this before? 

Let me know if I can provide any additional information. 
Thanks in advance for any insight!

More information about the Bucardo-general mailing list