File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -164,13 +164,6 @@ jobs:
164164 --health-interval 10s
165165 --health-timeout 5s
166166 --health-retries 5
167- -c fsync=off
168- -c wal_level=minimal
169- -c full_page_writes=off
170- -c checkpoint_timeout=10min
171- -c shared_buffers=256MB
172- -c synchronous_commit=off
173- -c max_wal_senders=0
174167 ports :
175168 - 5432:5432
176169
@@ -196,6 +189,18 @@ jobs:
196189 # This ensures psql version matches PostgreSQL server for snapshot tests
197190 - run : sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -v ${POSTGRES_VERSION} -i -p
198191
192+ # Apply PostgreSQL performance optimizations for test speed
193+ # WARNING: These settings sacrifice data durability for speed - test environments only!
194+ - run : |
195+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres -c "ALTER SYSTEM SET fsync = off;"
196+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres -c "ALTER SYSTEM SET wal_level = minimal;"
197+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres -c "ALTER SYSTEM SET full_page_writes = off;"
198+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres -c "ALTER SYSTEM SET checkpoint_timeout = '10min';"
199+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres -c "ALTER SYSTEM SET shared_buffers = '256MB';"
200+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres -c "ALTER SYSTEM SET synchronous_commit = off;"
201+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres -c "ALTER SYSTEM SET max_wal_senders = 0;"
202+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres -c "SELECT pg_reload_conf();"
203+
199204 - run : cargo build --tests --workspace
200205 - run : cargo test --workspace
201206
You can’t perform that action at this time.
0 commit comments