diff options
author | Eric Wong <e@80x24.org> | 2021-10-12 22:44:58 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-13 00:41:23 +0000 |
commit | 340b740e5caa8337b91b4f490ff60c1084931be6 (patch) | |
tree | dfd622bc5963fbaae4dcc5394c75684c14933eca /lib/PublicInbox/SearchIdx.pm | |
parent | 9a5be3eef9b5e3bf02b40080a83b18be6e87048f (diff) | |
download | public-inbox-340b740e5caa8337b91b4f490ff60c1084931be6.tar.gz |
This covers v1 inboxes, as well. We also guard the execution since "PRAGMA optimize" was only introduced in SQLite 3.18.0 (2017-03-30)
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index a2ed9499..928152ec 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -793,6 +793,7 @@ sub v1_checkpoint ($$;$) { ${$sync->{max}} = $self->{batch_bytes}; $self->{mm}->{dbh}->commit; + eval { $self->{mm}->{dbh}->do('PRAGMA optimize') }; my $xdb = $self->{xdb}; if ($newest && $xdb) { my $cur = $xdb->get_metadata('last_commit'); |