truncate WAL log on start

feat/vaults
Tomáš Mládek 2021-12-05 20:30:31 +01:00
parent cec3c4891e
commit dacfc57d11
1 changed files with 2 additions and 2 deletions

View File

@ -278,8 +278,8 @@ pub fn open_upend<P: AsRef<Path>>(
let enable_wal_mode = true;
pool.get().unwrap().execute(if enable_wal_mode {
trace!("Enabling WAL journal mode");
"PRAGMA journal_mode = WAL;"
trace!("Enabling WAL journal mode & truncating WAL log...");
"PRAGMA journal_mode = WAL;PRAGMA wal_checkpoint(TRUNCATE);"
} else {
trace!("Enabling TRUNCATE journal mode");
"PRAGMA journal_mode = TRUNCATE;"