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.
This commit is contained in:
Alan Guo Xiang Tan 2024-01-29 10:14:32 +08:00 committed by GitHub
parent 91bfc513ac
commit 23738541da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,6 +29,7 @@ if should_setup
run "#{BIN}/initdb -D #{DATA}" run "#{BIN}/initdb -D #{DATA}"
run "echo fsync = off >> #{DATA}/postgresql.conf" 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 full_page_writes = off >> #{DATA}/postgresql.conf"
run "echo shared_buffers = 500MB >> #{DATA}/postgresql.conf" run "echo shared_buffers = 500MB >> #{DATA}/postgresql.conf"
end end