Durability Levels (strict, group, relaxed)

Whether a "commit succeeded" response means "written to the device" or "will be written soon" differs by DBMS and by setting. KDBS names three levels and states what the response promises and what range can be lost. The level applies to the COMMIT of statements that write log records (INSERT, UPDATE, DELETE). An explicit transaction waits once at commit, not once per statement.

Key Specifications

LevelOther nameCommit responseRange that can be lost
strictD1Responds after fsyncing the WALNone
groupD2 (default)Responds after writing up to the same point as strict. The transactions committing at the same time share the fsyncNone
relaxedD3Responds immediately. The WAL drain syncs every wal_drain_interval_us (default 1,000µs)Commits within that interval
Setting or statementScope
durability = group (setting)Instance default
`SET DURABILITY {STRICTGROUP
BEGIN … DURABILITY <level>One transaction
SYNCSyncs the log and storage now (admin)
READ ONLY transactionIndependent of the level, because it writes no log. COMMIT finishes immediately

The manual explains why SET DURABILITY does not apply retroactively to an open transaction: a transaction that has already written log records under a D3 window cannot later be given the D1 promise. A window that has been written is written.

In the Sandbox

The load script inserts data with SET DURABILITY RELAXED and runs SYNC at the end. The data can be recreated from the script, so there is no reason to wait on every commit. Sandbox runs are READ ONLY transactions, so they leave no log.

Checkpoint and Recovery

A checkpoint writes dirty pages every checkpoint_interval_ms (default 5,000ms). Recovery runs at mount time, and every commit that was acknowledged under strict or group comes back. If the log device refuses a write or a sync, the engine rejects every write statement after that (wal_stopped=1), and only a restart makes writes possible again. A rejected COMMIT is also recovered if its record had already reached the device.

Comparison with Other DBMSs

Immediate fsyncGroup commitRespond first
KDBSstrictgroup (default)relaxed
PostgreSQLsynchronous_commit = on (group commit via commit_delay)synchronous_commit = off
MySQL InnoDBinnodb_flush_log_at_trx_commit = 1Binary log group commit= 2, = 0
OracleCOMMIT_WRITE = WAITLGWR writes in batchesNOWAIT, BATCH
SQL ServerDefaultBatches log flushesDelayed Durability

Related pages