63 |
print "Master connection is $minfo\n" if ($debug); |
print "Master connection is $minfo\n" if ($debug); |
64 |
print "Slave connection is $sinfo\n" if ($debug); |
print "Slave connection is $sinfo\n" if ($debug); |
65 |
|
|
66 |
my $mdbh = DBI->connect("DBI:Pg:$minfo", $masteruser, $masterpassword, { PrintError => 1 }); |
my $mdbh = DBI->connect("DBI:Pg:$minfo", $masteruser, $masterpassword, { PrintError => 0 } ); |
67 |
my $sdbh = DBI->connect("DBI:Pg:$sinfo", $slaveuser, $slavepassword, { PrintError => 1 }); |
if (! $mdbh) { |
68 |
|
print "Can't connect to master database $master"; |
69 |
|
print "on $masterhost" if ($masterhost); |
70 |
|
print "\n"; |
71 |
|
exit 1; |
72 |
|
} |
73 |
|
my $sdbh = DBI->connect("DBI:Pg:$sinfo", $slaveuser, $slavepassword, { PrintError => 0 }); |
74 |
|
if (! $sdbh) { |
75 |
|
print "Can't connect to slave database $slave"; |
76 |
|
print "on $slavehost" if ($slavehost); |
77 |
|
print "\n"; |
78 |
|
exit 1; |
79 |
|
} |
80 |
|
|
81 |
my ($diff_shema,$diff_data) = (0,0); |
my ($diff_shema,$diff_data) = (0,0); |
82 |
|
|