diff --git a/ts/sql/Server.ts b/ts/sql/Server.ts index 9be08df9b6..08b211b91f 100644 --- a/ts/sql/Server.ts +++ b/ts/sql/Server.ts @@ -698,6 +698,19 @@ function openAndSetUpSQLCipher( 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; }