##
## This script should only be called via the 'bucardo' program
##
-## Copyright 2006-2013 Greg Sabino Mullane <greg@endpoint.com>
+## Copyright 2006-2014 Greg Sabino Mullane <greg@endpoint.com>
##
## Please visit http://bucardo.org for more information
created => scalar localtime,
mcppid => $$,
verbose => 1,
- logdest => ['/var/log/bucardo'],
+ logdest => ['.'],#'/var/log/bucardo'],
warning_file => '',
logseparate => 0,
logextension => '',
$dsn .= join ';', map {
($_ eq 'dbservice' ? 'service' : $_ ) . "=$d->{$_}";
} grep { defined $d->{$_} and length $d->{$_} } qw/dbname dbservice/;
+ $self->glog("DDSSNN=$dsn");
}
elsif ('drizzle' eq $dbtype) {
$dsn = "dbi:drizzle:database=$d->{dbname}";
$self->glog("DSN: $dsn", LOG_NORMAL) if exists $config{log_level};
+warn "DSN=$dsn\n";
$dbh = DBI->connect
(
$dsn,
=head1 LICENSE AND COPYRIGHT
-Copyright (c) 2005-2013 Greg Sabino Mullane <greg@endpoint.com>.
+Copyright (c) 2005-2014 Greg Sabino Mullane <greg@endpoint.com>.
This software is free to use: see the LICENSE file for details.
</p>
<hr />
<h1><a name="license_and_copyright">LICENSE AND COPYRIGHT</a></h1>
-<p>Copyright (c) 2005-2013 Greg Sabino Mullane <<a href="mailto:greg@endpoint.com">greg@endpoint.com</a>>.</p>
+<p>Copyright (c) 2005-2014 Greg Sabino Mullane <<a href="mailto:greg@endpoint.com">greg@endpoint.com</a>>.</p>
<p>This software is free to use: see the LICENSE file for details.</p>
</body>
-Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
Greg Sabino Mullane <greg@endpoint.com>. All rights reserved.
Redistribution and use in source and binary forms, with or without
COPYRIGHT:
----------
- Copyright (c) 2005-2013 Greg Sabino Mullane <greg@endpoint.com>
+ Copyright (c) 2005-2014 Greg Sabino Mullane <greg@endpoint.com>
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.3 or,
## Script to control Bucardo
##
-## Copyright 2006-2013 Greg Sabino Mullane <greg@endpoint.com>
+## Copyright 2006-2014 Greg Sabino Mullane <greg@endpoint.com>
##
## Please see http://bucardo.org/ for full documentation
##
=head1 COPYRIGHT
-Copyright 2006-2013 Greg Sabino Mullane <greg@endpoint.com>
+Copyright 2006-2014 Greg Sabino Mullane <greg@endpoint.com>
This program is free to use, subject to the limitations in the LICENSE file.
<p>Boolean indicating whether or not to analyze the table after every sync. Off
by default. Optional.</p>
</dd>
-<dt><strong><a name="vaccuum_after_copy" class="item"><code>vaccuum_after_copy</code></a></strong></dt>
+<dt><strong><a name="vacuum_after_copy" class="item"><code>vacuum_after_copy</code></a></strong></dt>
<dd>
<p>Boolean indicating whether or not to vacuum the table after every sync. Off by
<dd>
<p>Boolean indicating whether or not to analyze the table after every sync.</p>
</dd>
-<dt><strong><code>vaccuum_after_copy</code></strong></dt>
+<dt><strong><code>vacuum_after_copy</code></strong></dt>
<dd>
<p>Boolean indicating whether or not to vacuum the table after every sync.</p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
-<p>Copyright 2006-2013 Greg Sabino Mullane <<a href="mailto:greg@endpoint.com">greg@endpoint.com</a>></p>
+<p>Copyright 2006-2014 Greg Sabino Mullane <<a href="mailto:greg@endpoint.com">greg@endpoint.com</a>></p>
<p>This program is free to use, subject to the limitations in the LICENSE file.</p>
</body>
## We have to set up the PGSERVICEFILE early on, so the proper
## environment variable is set for all processes from the beginning.
-my ($fh, $service_temp_filename) = tempfile("bucardo_pgservice.tmp.XXXX", UNLINK => 0);
+my ($service_fh, $service_temp_filename) = tempfile("bucardo_pgservice.tmp.XXXX", UNLINK => 0);
$ENV{PGSERVICEFILE} = getcwd . '/' . $service_temp_filename;
plan tests => $single_tests +
for my $name (qw/ A B C D A1 /) {
$t = "Adding database from cluster $name works";
my ($dbuser,$dbport,$dbhost) = $bct->add_db_args($name);
- my $status = $name eq 'E' ? 'inactive' : 'active';
- $command = "bucardo add db $name dbname=bucardo_test user=$dbuser port=$dbport host=$dbhost status=$status";
+ $command = "bucardo add db $name dbname=bucardo_test user=$dbuser port=$dbport host=$dbhost status=active";
$res = $bct->ctl($command);
like ($res, qr/Added database "$name"/, $t);
}
## Teach Bucardo about the fifth database using a service file
$t = "Adding database E via a service name works";
my ($dbuser,$dbport,$dbhost) = $bct->add_db_args('E');
-print $fh "[dbE]\ndbname=bucardo_test\nuser=$dbuser\nport=$dbport\nhost=$dbhost\n";
-close $fh;
-$res = $bct->ctl("add db E service=dbE");
+print $service_fh "[dbE]\ndbname=bucardo_test\nuser=$dbuser\nport=$dbport\nhost=$dbhost\n";
+close $service_fh;
+$res = $bct->ctl("add db E service=dbE status=inactive");
like ($res, qr/Added database "E"/, $t);
+exit;
+
## Put all pk tables into a relgroup
$t = q{Adding all PK tables on the master works};
$res = $bct->ctl(q{bucardo add tables '*bucardo*test*' '*Bucardo*test*' db=A relgroup=allpk pkonly});