More makedelta work, write out some ideas.
authorGreg Sabino Mullane <greg@endpoint.com>
Tue, 11 Dec 2012 06:53:19 +0000 (01:53 -0500)
committerGreg Sabino Mullane <greg@endpoint.com>
Tue, 11 Dec 2012 06:53:19 +0000 (01:53 -0500)
Bucardo.pm

index 57b8324df088f806c181f86ec70961b1025ac5b8..7ee65af9ae3b23867721b6006ee1799f4d91f888 100644 (file)
@@ -2441,7 +2441,16 @@ sub start_kid {
                     ($SQL = $SQL{stage}{$g}) =~ s/TARGETNAME/'$x->{TARGETNAME}'/go;
                     $sth{stage}{$dbname}{$g} = $x->{dbh}->prepare($SQL, {pg_async => PG_ASYNC});
 
-                    ## XXX: This is probably a good place to populate $x->{is_makedelta}{$S}{$T}
+                    ## Set the per database/per table makedelta setting now
+                    ## XXX Make this work on a per-database level too
+                    ## Ideas:
+                    ## 1. Just use db.makedelta
+                    ## 2. Use a mapping table
+                    ## 3. Have goat.makedelta name the tables
+                    ## 3a. Allow intra-sync introspection etc. for automatic updating
+                    if ($g->{makedelta} eq 'on') {
+                        $x->{is_makedelta}{$S}{$T} = 1;
+                    }
 
                 } ## end each table
 
@@ -5757,7 +5766,6 @@ sub validate_sync {
         $customname{$row->{goat}}{$row->{db}} = $row->{newname};
     }
 
-
     ## Go through each table and make sure it exists and matches everywhere
     for my $g (@{$s->{goatlist}}) {