Quick Answer
synchronous_commit controls when PostgreSQL acknowledges a transaction as committed. on (default): WAL is flushed to disk before commit returns. off: commit returns before WAL write (faster but up to wal_writer_delay of data loss on crash). local: WAL flushed locally but not to synchronous standbys. remote_write/remote_apply: for replication durability. Use off for high-write, loss-tolerant workloads (metrics, logs).
Answer
synchronous_commit waits for WAL flush before acknowledging commits, improving durability but increasing latency.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.