core: Panic on fsync() error by default

Retrying fsync() on error was historically not safe ("fsyncgate") and
Postgres still defaults to panicing on fsync(). Therefore, add a
"data_sync_retry" pragma (disabled by default) and use it to determine
whether to panic on fsync() error or not.
This commit is contained in:
Pekka Enberg
2025-09-13 09:36:49 +03:00
parent a7e34f1551
commit d8f07fe3da
5 changed files with 67 additions and 4 deletions

View File

@@ -1318,6 +1318,8 @@ pub enum PragmaName {
#[strum(serialize = "cipher")]
#[cfg_attr(feature = "serde", serde(rename = "cipher"))]
EncryptionCipher,
/// Control fsync error retry behavior (0 = off/panic, 1 = on/retry)
DataSyncRetry,
/// List databases
DatabaseList,
/// Encoding - only support utf8