From ae74383563fad4bbb079a156810ffc6568ed218f Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Tue, 21 Oct 2025 15:49:18 -0300 Subject: [PATCH] fix(sqlite): remove WAL pragma Honestly I don't think we really need it. We basically only append to the messages tables, the default journaling seems enough to me. Using the default will also allow to use SMB shares, and reduce IO. Closes #473 See https://blog.sqlite.ai/journal-modes-in-sqlite See https://sqlite.org/pragma.html Signed-off-by: Carlos Alexandro Becker --- internal/db/connect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/db/connect.go b/internal/db/connect.go index bfe768c7a..5acff6ead 100644 --- a/internal/db/connect.go +++ b/internal/db/connect.go @@ -23,7 +23,7 @@ func Connect(ctx context.Context, dataDir string) (*sql.DB, error) { // Set pragmas for better performance pragmas := []string{ "PRAGMA foreign_keys = ON;", - "PRAGMA journal_mode = WAL;", + "PRAGMA journal_mode = DELETE;", "PRAGMA page_size = 4096;", "PRAGMA cache_size = -8000;", "PRAGMA synchronous = NORMAL;",