synchronous_commit
No restart — settable per sessiontuned by pgconfiguratorenum: on / off / local / remote_write / remote_apply
How long COMMIT waits for durability — the safe knob for trading a little durability for speed.
What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded
What it does
synchronous_commit controls what a COMMIT waits for before returning success. 'on' waits for WAL to be flushed (and, with synchronous standbys, replicated). 'off' returns immediately and flushes a moment later — so a crash can lose the last fraction of a second of commits, but never corrupts the database.
How to tune it
Unlike fsync, turning this 'off' is a safe performance lever: you risk losing a tiny window of recent transactions, not integrity. Great for high-throughput workloads that can tolerate that (e.g. analytics ingest, non-critical logging). It's per-session, so you can even relax it for specific transactions.
FAQ
- synchronous_commit = off vs fsync = off — what's the difference?
- synchronous_commit off only risks losing the last ~fraction of a second of commits after a crash; the database stays consistent. fsync off risks corrupting the whole cluster. The first is a reasonable performance trade; the second almost never is.