about summary refs log tree commit homepage
path: root/lib/PublicInbox/OverIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-10-12 22:44:58 +0000
committerEric Wong <e@80x24.org>2021-10-13 00:41:23 +0000
commit340b740e5caa8337b91b4f490ff60c1084931be6 (patch)
treedfd622bc5963fbaae4dcc5394c75684c14933eca /lib/PublicInbox/OverIdx.pm
parent9a5be3eef9b5e3bf02b40080a83b18be6e87048f (diff)
downloadpublic-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/OverIdx.pm')
-rw-r--r--lib/PublicInbox/OverIdx.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm
index d6d706f7..9fdb26c0 100644
--- a/lib/PublicInbox/OverIdx.pm
+++ b/lib/PublicInbox/OverIdx.pm
@@ -434,6 +434,7 @@ sub commit_lazy {
         my ($self) = @_;
         delete $self->{txn} or return;
         $self->{dbh}->commit;
+        eval { $self->{dbh}->do('PRAGMA optimize') };
 }
 
 sub begin_lazy {