openAndSetUpSQLCipher: Enable checkpoint_fullfsync pragma
This commit is contained in:
parent
dc4783dd19
commit
278866f3b7
1 changed files with 13 additions and 0 deletions
|
@ -698,6 +698,19 @@ function openAndSetUpSQLCipher(
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// fullfsync is only supported on macOS
|
||||||
|
db.pragma('fullfsync = false');
|
||||||
|
|
||||||
|
// a lower-impact approach, if fullfsync is too impactful
|
||||||
|
db.pragma('checkpoint_fullfsync = true');
|
||||||
|
} catch (error) {
|
||||||
|
logger.warn(
|
||||||
|
'openAndSetUpSQLCipher: Unable to set fullfsync',
|
||||||
|
Errors.toLogFormat(error)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return db;
|
return db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue