[Bucardo-general] b4: avoiding Pg's parentheses default mismatch on sync validate

Bill McGonigle bill at bfccomputing.com
Fri Mar 16 01:24:01 UTC 2012


Hi, folks,

Trying to validate a sync between Pg versions (8.1.23 on EL5 and 8.4.9 on EL6), I got:

[Thu Mar 15 20:53:03 2012]  MCP Warning: Source database for sync "ecommerce_wan" has column "seq" of table "public.category_names" with a DEFAULT of "0::smallint", but target database "ecommerce_db5" has a DEFAULT of "(0)::smallint"
[Thu Mar 15 20:53:03 2012]  MCP Validation of sync ecommerce_wan FAILED

Looking at the source I see a check for this, but I can't seem to figure out where the A and z in the regex comes from.  I patched those out and now it acts as I'd like:

[Thu Mar 15 21:13:40 2012]  MCP Warning: Postgres version mismatch leads to this difference, which is being tolerated: Source database for sync "ecommerce_wan" has column "seq" of table "public.category_names" with a DEFAULT of "0::smallint", but target database "ecommerce_db5" has a DEFAULT of "(0)::smallint"

Please let me know if I've missed something obvious (change below).

Thanks,
-Bill


--- /usr/lib/perl5/site_perl/5.8.8/Bucardo.pm~  2011-12-06 23:56:08.000000000 -0500
+++ /usr/lib/perl5/site_perl/5.8.8/Bucardo.pm   2012-03-15 21:13:21.000000000 -0400
@@ -2056,8 +2056,10 @@
                         my $scol_def = $scol->{def};
                         my $fcol_def = $fcol->{def};
                         for ($scol_def, $fcol_def) {
-                            s/\A\(//;
-                            s/\)\z//;
+#                            s/\A\(//;
+#                            s/\)\z//;
+                            s/\(//;
+                            s/\)//;
                         }
                         my $msg;
                         if ($scol_def eq $fcol_def) {


-- 
Bill McGonigle, Owner   
BFC Computing, LLC       
http://bfccomputing.com/ 
Telephone: +1.855.SW.LIBRE
Email, IM, VOIP: bill at bfccomputing.com           
VCard: http://bfccomputing.com/vcard/bill.vcf
Social networks: bill_mcgonigle/bill.mcgonigle


More information about the Bucardo-general mailing list