diff options
author | ivan <ivan> | 2002-07-27 02:47:12 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-07-27 02:47:12 +0000 |
commit | 6414c4c23d3fac2012d1524f17c0aae5e5012935 (patch) | |
tree | 00ee54841edaa743281e0e981423e32247337f66 | |
parent | dba4eeaf3610792b0ed1149723a8383cc4a6fef1 (diff) |
vacuum pg databases daily
-rwxr-xr-x | FS/bin/freeside-daily | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily index e6f02df33..142b0c73a 100755 --- a/FS/bin/freeside-daily +++ b/FS/bin/freeside-daily @@ -4,7 +4,7 @@ use strict; use Fcntl qw(:flock); use Date::Parse; use Getopt::Std; -use FS::UID qw(adminsuidsetup); +use FS::UID qw(adminsuidsetup driver_name dbh); use FS::Record qw(qsearch qsearchs); use FS::cust_main; @@ -41,6 +41,13 @@ foreach $cust_main ( @cust_main ) { } +if ( driver_name eq 'Pg' ) { + foreach my $statement ( 'vacuum', 'vacuum analyze' ) { + my $sth = dbh->prepare($statement) or die dbh->errstr; + $sth->execute or die $sth->errstr; + } +} + # subroutines sub untaint_argv { |