Skip to content
ParticleDB

Durability and restart

Start the server with an explicit directory and use the same directory after a restart. A new directory starts a separate database. Do not point two server processes at the same directory.

--wal-sync-mode accepts the following values:

Value Behavior
groupsync (default) Batches commits; a commit waits for its persistence flush.
sync Flushes each commit before acknowledging it.
nosync Disables write-ahead logging. Acknowledged changes can be lost on restart. Use only for disposable data.

For example, select the default durable mode explicitly with --wal-sync-mode groupsync. This setting controls the server’s persistence contract; it does not replace reliable storage or a tested backup.

Redis clients also have a separate --resp-commit-mode setting. Its default, sync, waits for persistence before acknowledging a write. In async mode an acknowledgement can precede the durable flush, so an operating-system crash or power loss can lose recent writes. Keep the durability mode explicit when comparing benchmark results.

Use the durable settings for application data. An option that disables persistence is suitable only for data you can recreate. A successful benchmark with relaxed durability is not comparable to a durable run.

In a disposable environment, create a record:

CREATE TABLE docs_restart (id BIGINT PRIMARY KEY, value TEXT);
INSERT INTO docs_restart VALUES (1, 'saved');

Stop the server cleanly, restart with the same data directory, then query:

SELECT value FROM docs_restart WHERE id = 1;

The value should be saved. This confirms your setup preserves this record across a clean restart. Crash and power-loss guarantees require separate fault testing.

Persistence is not a backup. A backup must support restoration to a separate environment and recovery from accidental changes or storage loss. Use only a backup command or storage-copy procedure documented for the installed edition; do not copy live files without a supported consistency procedure.

If your distribution lacks a backup command, plan an application-level export and verify the recovery scope, including schema and Particles. Import and export.

Documentation home · Troubleshooting