From 2bfbb5943abef7fb2d5db08f51cf498aecff3030 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 6 Aug 2020 10:37:10 +0000 Subject: msgmap: tmp_clone: use MEMORY journal upon reconnect Since reindexing releases the DB handle every indexBatchSize bytes, we need to ensure we keep the journal in-memory when reopening the DB since this is throwaway data. --- lib/PublicInbox/Msgmap.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm index c85e7796..eee8d6ca 100644 --- a/lib/PublicInbox/Msgmap.pm +++ b/lib/PublicInbox/Msgmap.pm @@ -248,6 +248,7 @@ sub atfork_parent { $self->{dbh} and die 'BUG: tmp_clone dbh not prepared for parent'; defined($self->{filename}) or die 'BUG: {filename} not defined'; $self->{dbh} = PublicInbox::Over::dbh_new($self, 2); + $self->{dbh}->do('PRAGMA journal_mode = MEMORY'); } sub atfork_prepare { -- cgit v1.2.3-24-ge0c7