Config not working in timescale ha docker container

When running a timescale ha docker container, postgres config is not being used.:
Provide a TL;DR of the problem

TimescaleDB version: 2.10.1
PostgreSQL version: 14
Other software: Docker: 26.1.4
OS: Ubuntu 22.04.4
Platform: Linux x86-64
Environment: [Production, Test, Development]

  1. While running timescaledb container using below command, the timescaledb-tune updates the /home/postgres/pgdata/data/postgresql.conf file and restart the database but the changes are not reflected in the pg_settings
    docker run -d --name name --net network -p 5432:5432 -e POSTGRES_PASSWORD=password -v “local config file path”:/etc/postgresql/postgresql.conf -v timescaledb-volume:/home/postgres/pgdata/data timescale/timescaledb-ha:pg14-latest
  2. Even after manually changing /home/postgres/pgdata/data/postgresql.conf file and restarting the docker container the changes are not reflected in the pg_settings. What is the recommended way to restart the database so that changes are picked?
  3. The external config file is not picked while running the following command to start a docker container which works while using timescale/timescaledb:2.10.1-pg14 image:
    docker run -d --name name --net network -p 5432:5432 -e POSTGRES_PASSWORD=password -v “local config file path”:/etc/postgresql/postgresql.conf timescale/timescaledb-ha:pg14-latest postgres -c ‘config_file=/etc/postgresql/postgresql.conf’

Notes:

  1. The image timescale/timescaledb:2.10.1-pg14 does not contain timescaledb toolkit and i.e. why we are using timescale/timescaledb-ha image. As the apk package manager in timescale/timescaledb:2.10.1-pg14 container is not able to find the timescaledb-toolkit package
  2. We are mounting a managed docker volume pointing to /home/postgres/pgdata/data

If you have related logs or config files please share them. This is a public forum please remove or disguise any identifying information such as usernames, passwords, domains, IP addresses before uploading files.

Hi Venkat, it’s confusing if this command is working or not. Can you clarify?

The command is working. But, the config file is not being considered.

I think I know what’s going on:

What I see is that you’re confused with:
-c ‘config_file=/etc/postgresql/postgresql.conf’

Which I think -c will just allow you to use one pair of configuration you want from the postgresql.conf.

Look my docker-compose file which needs to setup a configuration for the server:

 embed_ollama_llama3:
    image: timescale/timescaledb-ha:pg16
    container_name: embed_ollama_llama3
    ports:
      - "5434:5432"
    volumes:
      - ./embed_ollama_llama3:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=your_password
      - POSTGRES_DB=embed_ollama_llama3_db
      - POSTGRES_USER=embed_ollama_llama3_user
    command: "postgres -c ai.ollama_host=http://host.docker.internal:11434"

As you can see the command is using postgres -c and then I just make a real time config replacement but not the config_file itself.