Skip to content

Commit f48d463

Browse files
committed
fix: enable WAL before SQLite sync tuning
Set WAL mode on the same SQLite connection before lowering synchronous so startup never observes NORMAL durability outside WAL mode.
1 parent 54fd3bb commit f48d463

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/database/sqlite-pragmas.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { logger } from '../config/logger.js';
22

33
const SQLITE_PRAGMAS = [
4+
'PRAGMA journal_mode = WAL',
45
'PRAGMA synchronous = NORMAL',
56
'PRAGMA cache_size = -65536',
67
'PRAGMA temp_store = MEMORY',

0 commit comments

Comments
 (0)