mirror of https://github.com/coder/coder.git
chore: apply non-durability settings to test postgres container (#2479)
This commit applies some recommended settings to sacrifice durability for speed for our testing database: - Mount PGDATA dir on a tmpfs (--tmpfs /tmp) - Turn off fsync - Turn off synchronous_commit - Turn off full_page_writes Ref: https://www.postgresql.org/docs/current/non-durability.html
This commit is contained in:
parent
17ba4c8e88
commit
0d2f0d7f8c
8
Makefile
8
Makefile
|
@ -127,13 +127,17 @@ test-postgres-docker:
|
|||
--env POSTGRES_USER=postgres \
|
||||
--env POSTGRES_DB=postgres \
|
||||
--env PGDATA=/tmp \
|
||||
--tmpfs /tmp \
|
||||
--publish 5432:5432 \
|
||||
--name test-postgres-docker \
|
||||
--restart unless-stopped \
|
||||
--restart no \
|
||||
--detach \
|
||||
postgres:11 \
|
||||
-c shared_buffers=1GB \
|
||||
-c max_connections=1000
|
||||
-c max_connections=1000 \
|
||||
-c fsync=off \
|
||||
-c synchronous_commit=off \
|
||||
-c full_page_writes=off
|
||||
|
||||
.PHONY: test-clean
|
||||
test-clean:
|
||||
|
|
Loading…
Reference in New Issue