From: Eric Wong Date: Thu, 6 Aug 2020 10:37:10 +0000 (+0000) Subject: msgmap: tmp_clone: use MEMORY journal upon reconnect X-Git-Tag: v1.6.0~177 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=2bfbb5943abef7fb2d5db08f51cf498aecff3030 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. --- 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 {