* [PATCH 2/8] imaptracker: preserve WAL journal_mode if set by user
2020-08-27 12:16 5% [PATCH 0/8] mostly watch-related odds and ends Eric Wong
@ 2020-08-27 12:17 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-08-27 12:17 UTC (permalink / raw)
To: meta
It's no problem for most users to enable WAL, here, since
there's only a single process doing both reading and writing
(unlike the read-only daemons). However, WAL doesn't work on
network filesystems, so it can't be enabled by default.
---
lib/PublicInbox/IMAPTracker.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/IMAPTracker.pm b/lib/PublicInbox/IMAPTracker.pm
index 102a74ce..92f21584 100644
--- a/lib/PublicInbox/IMAPTracker.pm
+++ b/lib/PublicInbox/IMAPTracker.pm
@@ -29,7 +29,12 @@ sub dbh_new ($) {
sqlite_use_immediate_transaction => 1,
});
$dbh->{sqlite_unicode} = 1;
- $dbh->do('PRAGMA journal_mode = TRUNCATE');
+
+ # TRUNCATE reduces I/O compared to the default (DELETE).
+ # Allow and preserve user-overridden WAL, but don't force it.
+ my $jm = $dbh->selectrow_array('PRAGMA journal_mode');
+ $dbh->do('PRAGMA journal_mode = TRUNCATE') if $jm ne 'wal';
+
create_tables($dbh);
$dbh;
}
^ permalink raw reply related [relevance 7%]
* [PATCH 0/8] mostly watch-related odds and ends
@ 2020-08-27 12:16 5% Eric Wong
2020-08-27 12:17 7% ` [PATCH 2/8] imaptracker: preserve WAL journal_mode if set by user Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-08-27 12:16 UTC (permalink / raw)
To: meta
Mostly stuff around -watch, I've finally decided NNTP and IMAP
client support aren't as horrible-to-configure as I was
imagining. Well, maybe, at least I'm finding it somewhat
useful...
One problem I've been trying to avoid is having excessive,
overwhelming amounts of documentation. I tend to get
overwhelmed myself when learning new things, too.
Moving the watch-only stuff out of the config manpage seems like
a step in the right direction in that regard.
Eric Wong (8):
watchmaildir: ensure I:/W:/E: prefixes in warnings
imaptracker: preserve WAL journal_mode if set by user
overidx: inline create_ghost sub
doc: document graceful shutdown signals
doc: speling fickses
watch: imap: only remove \Seen spam
doc: move watch config docs to -watch manpage
doc: watch: expand on NNTP and IMAP-specific knobs
Documentation/public-inbox-config.pod | 38 ++--------
Documentation/public-inbox-edit.pod | 2 +-
Documentation/public-inbox-purge.pod | 2 +-
Documentation/public-inbox-tuning.pod | 2 +-
Documentation/public-inbox-watch.pod | 100 +++++++++++++++++++++++---
lib/PublicInbox/IMAPTracker.pm | 7 +-
lib/PublicInbox/OverIdx.pm | 23 +++---
lib/PublicInbox/WatchMaildir.pm | 31 +++++---
t/over.t | 4 +-
9 files changed, 135 insertions(+), 74 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-08-27 12:16 5% [PATCH 0/8] mostly watch-related odds and ends Eric Wong
2020-08-27 12:17 7% ` [PATCH 2/8] imaptracker: preserve WAL journal_mode if set by user Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).