weblate/ci/postgres/postgres-nondurable.sh
Michal Čihař e313c6748f CI: Use non-durable settings for postgres
* Switch to using docker-compose instead of services:
    - services start before checkout, so can not use data from it
    - the volumes option for services seems broken
* Non-durable settings should bring additional performance
* Prepare for multi database testing
* Always run databse on the port 60000
2020-02-21 15:11:48 +01:00

14 lines
686 B
Bash
Executable file

#!/bin/sh
# setting non-durable options
# https://www.postgresql.org/docs/current/static/non-durability.html
echo "Configuring postgres non-durable options."
# no need to flush data to disk.
echo "fsync = off" >> /var/lib/postgresql/data/postgresql.conf
# no need to force WAL writes to disk on every commit.
echo "synchronous_commit = off" >> /var/lib/postgresql/data/postgresql.conf
# no need to guard against partial page writes.
echo "full_page_writes = off" >> /var/lib/postgresql/data/postgresql.conf
# increase checkpoint interval
echo "checkpoint_timeout = 3600" >> /var/lib/postgresql/data/postgresql.conf
echo "max_wal_size = 128" >> /var/lib/postgresql/data/postgresql.conf