Modifying postgres.conf inside Docker
- Open a shell in Docker to change the configuration on a running container.
bash
docker start timescaledb
docker exec -i -t timescaledb /bin/bash- Edit and then save the config file, modifying the setting for the desired configuration parameter (for example,
max_wal_size).
bash
vi /var/lib/postgresql/data/postgresql.conf- Restart the container so the config gets reloaded.
bash
docker restart timescaledb- Test to see if the change worked.
bash
docker exec -it timescaledb psql -U postgres
postgres=# show max_wal_size;
max_wal_size
--------------
2GB