If you set synchronous_commit = off in postgresql.conf, you open yourself up to a small window of data loss (but not data corruption) and gain faster writes. It can even be set on a per-transaction basis. Unless you really can't afford data loss, I'd set it to off even in production.

Setting fsync = false can result in data loss AND data corruption. It should absolute not be set to false in production, but in development? Unless a corruption is a big concern, I always disable fsync.

Leave a Comment

All comments are reviewed before being made public.