This article is half-done without your Comment! *** Please share your thoughts via Comment ***
Important notice: Never try in your Production or any other Live server. This post is only ad-hoc and test server.
Data Durability is an important part of Database ACID property. In this post, I am sharing few parameters which we can disable for achieving good performance of PostgreSQL Database Server.
We should disable Non-Durable parameters on our test server where we need only POC related work, and if your system doesn’t require any guarantee of data, then you can disable.
Why disabling the Non-Durable parameters?
PostgreSQL guarantees the full durability of data even if the server crashes or loses power.
But committing every single transaction in datafile and log file is also extra overhead on the database server.
So simple, just disable that parameter for achieving good performance.
ACID Properties in Database System (Atomicity, Consistency, Isolation, Durability)
Below are parameters:
fsync: Turn off – no need to flush data to disk
synchronous_commit: Turn off – not need to write to disk on every commit
full_page_writes: Turn off – no need to guard against partial page writes
max_wal_size: Increase – reduces the frequency of checkpoints
checkpoint_timeout: Increase – reduces the frequency of checkpoints
Leave a Reply