]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiMailSync.pm
sqlite: PRAGMA optimize on close
[public-inbox.git] / lib / PublicInbox / LeiMailSync.pm
index 91cd1c934a1fa7889d293574d99df9878a53292f..c6cd1bc58d0ae0b5d676b56288680f8dbb5c0eda 100644 (file)
@@ -47,7 +47,8 @@ sub lms_write_prepare { ($_[0]->{dbh} //= dbh_new($_[0], 1)); $_[0] }
 sub lms_pause {
        my ($self) = @_;
        $self->{fmap} = {};
-       delete $self->{dbh};
+       my $dbh = delete $self->{dbh};
+       $dbh->do('PRAGMA optimize') if $dbh;
 }
 
 sub create_tables {