DB
Operations

Durability and crash recovery

Choose the acknowledgement contract and understand local restart recovery.

Durability has two independent inputs:

  1. the table's named storage_policy decides whether data is durable and where durable artifacts belong; and
  2. --wal-sync sets the default DML fsync posture, except where a policy such as sync_disk requires synchronous WAL.

Neither setting creates a replica.

WAL sync modes

ModeAcknowledgement and crash contractUse
alwaysFsync every DML statement before response. An acknowledged write survives process, OS, and power crash on correctly functioning durable storage.Strongest local acknowledgement boundary
groupFsync after 64 records or 10 ms, whichever comes first. Process crash loses no accepted tail; hard OS/power crash may lose the unfsynced acknowledged tail.Current executable default
offRely on OS page-cache writeback. A hard crash can lose an unbounded acknowledged tail; clean shutdown performs a final sync.Benchmark/test only

DDL records are fsynced regardless of the DML mode.

group is not fsync-before-ack. If the written RPO says an acknowledged write must survive power loss, use --wal-sync=always or a table policy that enforces synchronous WAL, and verify the storage stack honors fsync.

Built-in table postures

PolicyServing postureDurable
ephemeral_memoryProcess memoryNo
memory_dataMemory-resident serving with durable WAL/parts under --data-dirYes
disk_dataLocal disk serving/parts with memory indexesYes
sync_diskLocal disk with synchronous policy WALYes
defaultSynthesized durable local-disk policyYes

memory_data is not ephemeral. It needs a persistent data directory for its durable artifacts and rebuilds its serving state during recovery.

Recovery sequence

On startup with --data-dir, the engine:

  1. opens and validates the local catalog state;
  2. loads committed catalog and parts checkpoints;
  3. validates immutable part metadata;
  4. replays the valid WAL suffix in sequence order;
  5. applies only complete logical commits; and
  6. restores maintained in-memory structures before serving queries.

CRC and commit boundaries prevent a torn final frame or incomplete multi-record batch from becoming visible. Corruption in the middle of required history is a fatal recovery error, not an invitation to skip data.

Clean versus hard failure

FailureExpected handling
Graceful SIGTERMStop intake, complete shutdown lifecycle, perform configured final sync
Process crashReopen durable files and replay valid WAL; group mode's accepted process-local tail is preserved
OS/power crashRecovery stops at the durable storage frontier; group may lose its unfsynced tail
Disk loss/corruptionRestore from an independent verified backup

Verification procedure

For each production policy:

  1. insert a uniquely identified canary;
  2. capture whether the response was successful;
  3. test clean restart;
  4. test process termination;
  5. test hard failure on equivalent storage;
  6. compare recovered keys and expected frontier; and
  7. retain the results with the declared acknowledgement/RPO contract.

Do not use filesystem modification times to infer commit order. Native backup PITR uses the unified journal's inclusive sequence and logical commit boundary.

On this page