From 3cf7afe4ff9bc62d1a5c0d78aae35193251dca25 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 10 Mar 2005 09:56:07 +0000 Subject: [PATCH] fine. --- FS/bin/freeside-daily | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily index ae71112dd..75bbca7d8 100755 --- a/FS/bin/freeside-daily +++ b/FS/bin/freeside-daily @@ -5,7 +5,7 @@ use Fcntl qw(:flock); use Date::Parse; use Getopt::Std; use FS::UID qw(adminsuidsetup driver_name dbh datasrc); -use FS::Record qw(qsearch qsearchs); +use FS::Record qw(qsearch qsearchs dbdef); use FS::Conf; use FS::cust_main; @@ -57,8 +57,10 @@ foreach $cust_main ( @cust_main ) { if ( driver_name eq 'Pg' ) { dbh->{AutoCommit} = 1; #so we can vacuum - my $sth = dbh->prepare('vacuum analyze') or die dbh->errstr; - $sth->execute or die $sth->errstr; + foreach my $table ( dbdef->tables ) { + my $sth = dbh->prepare("VACUUM ANALYZE $table") or die dbh->errstr; + $sth->execute or die $sth->errstr; + } } my $conf = new FS::Conf; -- 2.11.0