--- trunk/index_DBI_cache.pm 2004/01/18 21:11:39 205 +++ trunk/index_DBI_cache.pm 2004/01/31 20:57:48 206 @@ -44,6 +44,8 @@ my $user = shift || die "need dbi_user= in [global] section of configuration file"; my $passwd = shift || die "need dbi_passwd= in [global] section of configuration file"; + $self->{dbd} = $dbd; + $self->{dbh} = DBI->connect("DBI:$dbd:$dsn",$user,$passwd) || die $DBI::errstr; $Count++; @@ -211,6 +213,11 @@ $self->{dbh}->commit || die $self->{dbh}->errstr(); } + + if ($self->{dbd} =~ m/(Pg|SQLite)/) { + $self->{dbh}->do(qq{vacuum}) || warn "vacumming failed. It shouldn't if you are using PostgreSQL or SQLite: ".$self->{dbh}->errstr(); + } + $self->bench("disconnecting from database"); $self->{dbh}->disconnect;