Press "Enter" to skip to content

Asynchronous Commits in PostgreSQL

Shayon Mukherjee discusses trade-offs:

I was recently looking into some workloads that generate a lot of I/O and CPU contention on some very high-write code paths and came across synchronous_commit (https://www.postgresql.org/docs/current/wal-async-commit.html). It can be very tempting to turn this off globally because the performance gains in terms of I/O, CPU, and TPS (transactions per second) are very hard to overlook. I noticed I/O completely gone, CPU down 20% (at peak), and a 30% increase in TPS. However, this comes with important trade-offs that are worthwhile keeping in mind.

Click through for more information. This sounds a lot like the delayed durability feature in SQL Server, though you have more fine-grained control in PostgreSQL versus it being a database-level setting in SQL Server.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.