Updating a TimescaleDB Docker installation

    The following instructions assume that your docker instance is named . If not, replace this name with the one you use in the subsequent commands.

    Step 1: Pull new image

    Install the current TimescaleDB 2.0 image:

    Step 2: Determine mount point used by old container

    As you’ll want to restart the new docker image pointing to a mount point that contains the previous version’s data, we first need to determine the current mount point.

      This command will return either volume or bind, corresponding to the two options below.

      1. Volumes — to get the current volume name use:

      2. — to get the current mount path use:

        1. /path/to/data

      Step 3: Stop old container

      If the container is currently running, stop and remove it in order to connect the new one.

      Step 4: Start new container

      1. For volume mounts you can use:

        1. If using bind-mounts, you need to run:

        Step 5: Run ALTER EXTENSION

        Finally, connect to this instance via psql (with the -X flag) and execute the command as above in order to update the extension to the latest version:

        1. docker exec -it timescaledb psql -U postgres -X
        2. # within the PostgreSQL instance
        3. ALTER EXTENSION timescaledb UPDATE;

        You can then run the command to make sure you have the latest version of TimescaleDB installed.