just "vaccum analyze" is fine
[freeside.git] / FS / bin / freeside-daily
index 9ff21d4..7089440 100755 (executable)
@@ -16,7 +16,7 @@ my $user = shift or die &usage;
 
 adminsuidsetup $user;
 
-$FS::cust_main::Debug = 1 if $opt_v;
+$FS::cust_main::DEBUG = 1 if $opt_v;
 
 my %search;
 $search{'payby'} = $opt_p if $opt_p;
@@ -57,10 +57,8 @@ foreach $cust_main ( @cust_main ) {
 
 if ( driver_name eq 'Pg' ) {
   dbh->{AutoCommit} = 1; #so we can vacuum
-  foreach my $statement ( 'vacuum', 'vacuum analyze' ) {
-    my $sth = dbh->prepare($statement) or die dbh->errstr;
-    $sth->execute or die $sth->errstr;
-  }
+  my $sth = dbh->prepare('vacuum analyze') or die dbh->errstr;
+  $sth->execute or die $sth->errstr;
 }
 
 #local hack