From 0400ce9cdf9b787fa90d6a2e35a954846ea79581 Mon Sep 17 00:00:00 2001 From: losfair Date: Tue, 23 Aug 2022 14:05:43 +0000 Subject: [PATCH] optionally disable wal --- src/services/sql.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/sql.js b/src/services/sql.js index 06159abda7..6e2ffd5375 100644 --- a/src/services/sql.js +++ b/src/services/sql.js @@ -11,7 +11,9 @@ const cls = require('./cls'); const fs = require("fs-extra"); const dbConnection = new Database(dataDir.DOCUMENT_PATH); -dbConnection.pragma('journal_mode = WAL'); +if (process.env.TRILIUM_DB_DISABLE_WAL !== "1") { + dbConnection.pragma('journal_mode = WAL'); +} const LOG_ALL_QUERIES = false;