If you are running TimescaleDB in a Docker container, there are two different ways to modify your PostgreSQL configuration. You can edit the PostgreSQL configuration file inside the Docker container, or you can set parameters at the command prompt.

You can start the Dockert container, and then use a text editor to edit the PostgreSQL configuration file directly. The configuration file requires one parameter per line. Blank lines are ignored, and you can use a # symbol at the beginning of a line to denote a comment.

  1. Start your Docker instance:

    docker start timescaledb
  2. Open a shell:

    docker exec -i -t timescaledb /bin/bash
  3. Open the configuration file in Vi editor or your preferred text editor.

    vi /var/lib/postgresql/data/postgresql.conf
  4. Restart the container to reload the configuration:

    docker restart timescaledb

If you don't want to open the configuration file to make changes, you can also set parameters directly from the command prompt inside your Docker container, using the -c option. For example:

docker run -i -t timescale/timescaledb:latest-pg10 postgres -c max_wal_size=2GB

Keywords

Found an issue on this page?

Report an issue!