openAndSetUpSQLCipher: Enable checkpoint_fullfsync pragma

This commit is contained in:
automated-signal 2024-09-17 14:51:54 -05:00 committed by GitHub
parent dc4783dd19
commit 278866f3b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
} }