Memory fix

This commit is contained in:
Andrea Cavalli 2020-01-06 20:05:30 +01:00
parent 2e38a0f61c
commit 1f6dbfd467

View File

@ -135,12 +135,12 @@ Status init_binlog(Binlog &binlog, string path, BinlogKeyValue<Binlog> &binlog_p
Status init_db(SqliteDb &db) {
TRY_STATUS(db.exec("PRAGMA encoding=\"UTF-8\""));
TRY_STATUS(db.exec("PRAGMA journal_mode=TRUNCATE"));
TRY_STATUS(db.exec("PRAGMA journal_mode=WAL"));
TRY_STATUS(db.exec("PRAGMA cache_size=20000"));
TRY_STATUS(db.exec("PRAGMA cache_size=2000"));
TRY_STATUS(db.exec("PRAGMA page_size=4096"));
TRY_STATUS(db.exec("PRAGMA synchronous=NORMAL"));
TRY_STATUS(db.exec("PRAGMA temp_store=DEFAULT"));
TRY_STATUS(db.exec("PRAGMA temp_store=MEMORY"));
TRY_STATUS(db.exec("PRAGMA secure_delete=0"));
return Status::OK();