From 23738541dae4635e1c8209e4aa6486a0d4602874 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Mon, 29 Jan 2024 10:14:32 +0800 Subject: [PATCH] DEV: Set `synchronous_commit` to `off` in `start_test_db` (#25453) Why this change? In https://www.postgresql.org/docs/current/non-durability.html, it is recommended to turn off `synchronous_commit` in environments where durability is not important. The `start_test_db.rb` script is mainly used in the CI environment where durability is not important at all. --- script/start_test_db.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/script/start_test_db.rb b/script/start_test_db.rb index 259fbdf9ec2..25400912354 100755 --- a/script/start_test_db.rb +++ b/script/start_test_db.rb @@ -29,6 +29,7 @@ if should_setup run "#{BIN}/initdb -D #{DATA}" run "echo fsync = off >> #{DATA}/postgresql.conf" + run "echo synchronous_commit = off >> #{DATA}/postgresql.conf" run "echo full_page_writes = off >> #{DATA}/postgresql.conf" run "echo shared_buffers = 500MB >> #{DATA}/postgresql.conf" end