Install, update, and uninstall TimescaleDB Toolkit
Install, update, and uninstall the TimescaleDB Toolkit extension to access more hyperfunctions and function pipelines
Some hyperfunctions are included by default in TimescaleDB. For additional hyperfunctions, you need to install the TimescaleDB Toolkit PostgreSQL extension.
If you’re hosting the TimescaleDB extension on your self-hosted database, you can install Toolkit by:
- Using the TimescaleDB high-availability Docker image
- Using a package manager such as
yum,apt, orbrewon platforms where pre-built binaries are available - Building from source. For more information, see the Toolkit developer documentation
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”The Toolkit extension is pre-installed and pre-enabled when you install the TimescaleDB HA docker image from a Docker container. Once you start the container, the extension is already active in your database and ready to use. No additional installation steps are required.
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”To get the latest version of Toolkit, update the TimescaleDB HA docker image.
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”Toolkit is included in the TimescaleDB HA Docker image and cannot be uninstalled separately. To remove Toolkit, you need to remove the entire TimescaleDB container. See Uninstall TimescaleDB from Docker.
To remove the extension from a specific database without removing the container:
- Connect to your database
Terminal window docker exec -it timescaledb psql -U postgres -d <database_name> - Drop the Toolkit extensionDROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE;Warning
Using
CASCADEdrops all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep.
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”The Toolkit extension is pre-installed and pre-enabled when you install TimescaleDB on Kubernetes. Once you start the container, the extension is already active in your database and ready to use. No additional installation steps are required.
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”To get the latest version of Toolkit, update the TimescaleDB HA Docker image used by your Kubernetes StatefulSet:
- Update the StatefulSet to use the latest image
Replace
<new-version>with the desired version tag. For example,pg18. You find the available tags on the TimescaleDB HA Docker Hub page.Terminal window kubectl set image statefulset/timescaledb timescaledb=timescale/timescaledb-ha:<new-version> -n tigerdataKubernetes performs a rolling update, replacing the pod with the new image version.
- Verify the new image is running
Terminal window kubectl get statefulset timescaledb -n tigerdata -o jsonpath='{.spec.template.spec.containers[0].image}' - Connect to your TimescaleDB pod and verify the extension versions
Terminal window kubectl exec -it test-pod -- bash -c "psql -h \$PGHOST -U \$PGUSER -d \$PGDATABASE"\dx
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”Toolkit is included in the TimescaleDB HA Docker image and cannot be uninstalled separately. To remove Toolkit, you need to remove the entire TimescaleDB deployment. See Uninstall TimescaleDB from Kubernetes.
If you only want to remove the extension from a specific database without removing the deployment:
- Connect to your TimescaleDB pod
Terminal window kubectl exec -it test-pod -- bash -c "psql -h \$PGHOST -U \$PGUSER -d \$PGDATABASE" - Drop the Toolkit extension
At the
psqlprompt:DROP EXTENSION timescaledb_toolkit;WarningUsing
CASCADEdrops all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep.
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”These instructions use the apt package manager.
- Update your local repository list
Terminal window sudo apt update - Install TimescaleDB Toolkit
Terminal window sudo apt install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Create the Toolkit extension in the databaseCREATE EXTENSION timescaledb_toolkit;
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”Update Toolkit by installing the latest version and running ALTER EXTENSION.
- Update your local repository list
Terminal window apt update - Install the latest version of TimescaleDB Toolkit
Terminal window apt install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Update the Toolkit extension in the databaseALTER EXTENSION timescaledb_toolkit UPDATE;Note
For some Toolkit versions, you might need to disconnect and reconnect active sessions.
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”If you no longer need Toolkit, you can remove it without uninstalling TimescaleDB or PostgreSQL.
- Drop the Toolkit extension from your databases
Connect to each database where Toolkit is enabled and remove the extension:
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"At the
psqlprompt:DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE;Repeat this for all databases with Toolkit enabled. To exit psql, type
\q.WarningUsing
CASCADEwill drop all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep. - Uninstall the Toolkit package
Terminal window sudo apt remove timescaledb-toolkit-postgresql-18Replace
18with your PostgreSQL version if different. - (Optional) Remove dependencies
To also remove unused dependencies:
Terminal window sudo apt autoremove
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”These instructions use the apt package manager.
- Update your local repository list
Terminal window sudo apt update - Install TimescaleDB Toolkit
Terminal window sudo apt install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Create the Toolkit extension in the databaseCREATE EXTENSION timescaledb_toolkit;
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”Update Toolkit by installing the latest version and running ALTER EXTENSION.
- Update your local repository list
Terminal window apt update - Install the latest version of TimescaleDB Toolkit
Terminal window apt install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Update the Toolkit extension in the databaseALTER EXTENSION timescaledb_toolkit UPDATE;Note
For some Toolkit versions, you might need to disconnect and reconnect active sessions.
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”If you no longer need Toolkit, you can remove it without uninstalling TimescaleDB or PostgreSQL.
- Drop the Toolkit extension from your databases
Connect to each database where Toolkit is enabled and remove the extension:
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"At the
psqlprompt:DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE;Repeat this for all databases with Toolkit enabled. To exit psql, type
\q.WarningUsing
CASCADEwill drop all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep. - Uninstall the Toolkit package
Terminal window sudo apt remove timescaledb-toolkit-postgresql-18Replace
18with your PostgreSQL version if different. - (Optional) Remove dependencies
To also remove unused dependencies:
Terminal window sudo apt autoremove
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”These instructions use the yum package manager.
- Update your local repository list
Terminal window sudo yum update - Install TimescaleDB Toolkit
Terminal window sudo yum install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Create the Toolkit extension in the databaseCREATE EXTENSION timescaledb_toolkit;
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”Update Toolkit by installing the latest version and running ALTER EXTENSION.
- Update your local repository list
Terminal window yum update - Install the latest version of TimescaleDB Toolkit
Terminal window yum install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Update the Toolkit extension in the databaseALTER EXTENSION timescaledb_toolkit UPDATE;Note
For some Toolkit versions, you might need to disconnect and reconnect active sessions.
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”If you no longer need Toolkit, you can remove it without uninstalling TimescaleDB or PostgreSQL.
- Drop the Toolkit extension from your databases
Connect to each database where Toolkit is enabled and remove the extension:
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"At the
psqlprompt:DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE;Repeat this for all databases with Toolkit enabled. To exit psql, type
\q.WarningUsing
CASCADEwill drop all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep. - Uninstall the Toolkit package
Terminal window sudo yum remove timescaledb-toolkit-postgresql-18Replace
18with your PostgreSQL version if different. - (Optional) Remove dependencies
To also remove unused dependencies:
Terminal window sudo yum autoremove
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”These instructions use the yum package manager.
- Update your local repository list
Terminal window sudo yum update - Install TimescaleDB Toolkit
Terminal window sudo yum install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Create the Toolkit extension in the databaseCREATE EXTENSION timescaledb_toolkit;
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”Update Toolkit by installing the latest version and running ALTER EXTENSION.
- Update your local repository list
Terminal window yum update - Install the latest version of TimescaleDB Toolkit
Terminal window yum install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Update the Toolkit extension in the databaseALTER EXTENSION timescaledb_toolkit UPDATE;Note
For some Toolkit versions, you might need to disconnect and reconnect active sessions.
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”If you no longer need Toolkit, you can remove it without uninstalling TimescaleDB or PostgreSQL.
- Drop the Toolkit extension from your databases
Connect to each database where Toolkit is enabled and remove the extension:
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"At the
psqlprompt:DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE;Repeat this for all databases with Toolkit enabled. To exit psql, type
\q.WarningUsing
CASCADEwill drop all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep. - Uninstall the Toolkit package
Terminal window sudo yum remove timescaledb-toolkit-postgresql-18Replace
18with your PostgreSQL version if different. - (Optional) Remove dependencies
To also remove unused dependencies:
Terminal window sudo yum autoremove
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”These instructions use the dnf package manager.
- Update your local repository list
Terminal window sudo dnf update - Install TimescaleDB Toolkit
Terminal window sudo dnf install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Create the Toolkit extension in the databaseCREATE EXTENSION timescaledb_toolkit;
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”Update Toolkit by installing the latest version and running ALTER EXTENSION.
- Update your local repository list
Terminal window sudo dnf update - Install the latest version of TimescaleDB Toolkit
Terminal window sudo dnf install timescaledb-toolkit-postgresql-18 - Connect to the database where you want to use Toolkit
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Update the Toolkit extension in the databaseALTER EXTENSION timescaledb_toolkit UPDATE;Note
For some Toolkit versions, you might need to disconnect and reconnect active sessions.
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”If you no longer need Toolkit, you can remove it without uninstalling TimescaleDB or PostgreSQL.
- Drop the Toolkit extension from your databases
Connect to each database where Toolkit is enabled and remove the extension:
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"At the
psqlprompt:DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE;Repeat this for all databases with Toolkit enabled. To exit psql, type
\q.WarningUsing
CASCADEwill drop all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep. - Uninstall the Toolkit package
Terminal window sudo dnf remove timescaledb-toolkit-postgresql-18Replace
18with your PostgreSQL version if different. - (Optional) Remove dependencies
To also remove unused dependencies:
Terminal window sudo dnf autoremove
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”These instructions use the brew package manager. For more information on
installing or using Homebrew, see the brew homepage.
- Tap the Tiger Data formula repository
This also contains formulae for TimescaleDB and
timescaledb-tune.Terminal window brew tap timescale/tap - Update your local brew installation
Terminal window brew update - Install TimescaleDB Toolkit
Terminal window brew install timescaledb-toolkit - Connect to PostgreSQL
Terminal window psql postgres - Create the Toolkit extension in the databaseCREATE EXTENSION timescaledb_toolkit;Warning
If you encounter an error like
could not access file "$libdir/timescaledb_toolkit-X.XX.X", you may need to create a symlink from.soto.dylibformat:Terminal window ln -sf $(pg_config --pkglibdir)/timescaledb_toolkit-*.so \$(pg_config --pkglibdir)/timescaledb_toolkit-*.dylibThis is due to a known issue in the Homebrew formula where the library is installed with a
.soextension, but PostgreSQL on macOS expects a.dylibextension.
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”Update Toolkit by installing the latest version and running ALTER EXTENSION.
- Update your local repository list
Terminal window brew update - Install the latest version of TimescaleDB Toolkit
Terminal window brew upgrade timescaledb-toolkit - Connect to PostgreSQL
Terminal window psql postgres - Update the Toolkit extension in the databaseALTER EXTENSION timescaledb_toolkit UPDATE;Note
For some Toolkit versions, you might need to disconnect and reconnect active sessions.
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”If you no longer need Toolkit, you can remove it without uninstalling TimescaleDB or PostgreSQL.
- Drop the Toolkit extension from your databases
Connect to each database where Toolkit is enabled and remove the extension:
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"At the
psqlprompt:DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE;Repeat this for all databases with Toolkit enabled. To exit psql, type
\q.WarningUsing
CASCADEwill drop all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep. - Uninstall the Toolkit package
Terminal window brew uninstall timescaledb-toolkit - (Optional) Remove manual symlinks
If you created a manual
.dylibsymlink as a workaround during installation, remove it:Terminal window rm $(pg_config --pkglibdir)/timescaledb_toolkit-*.dylib 2>/dev/null || true
Install TimescaleDB Toolkit
Section titled “Install TimescaleDB Toolkit”To install Toolkit from source:
- Build the extension from the latest source code
Follow the build instructions in the TimescaleDB Toolkit GitHub repository to download and build the latest version.
- Connect to your database
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Create the Toolkit extension in the databaseCREATE EXTENSION timescaledb_toolkit;
Update TimescaleDB Toolkit
Section titled “Update TimescaleDB Toolkit”To update Toolkit installed from source:
- Build the extension from the latest source code
Follow the build instructions in the TimescaleDB Toolkit GitHub repository to download and build the latest version.
- Connect to your database
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>" - Update the Toolkit extension in the databaseALTER EXTENSION timescaledb_toolkit UPDATE;
Uninstall TimescaleDB Toolkit
Section titled “Uninstall TimescaleDB Toolkit”If you installed Toolkit by building from source, you can uninstall it without removing TimescaleDB or PostgreSQL.
- Drop the Toolkit extension from your databases
Connect to each database where Toolkit is enabled and remove the extension:
Terminal window psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"At the
psqlprompt:DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE;Repeat this for all databases with Toolkit enabled. To exit psql, type
\q.WarningUsing
CASCADEwill drop all objects that depend on the Toolkit extension. Ensure you have backed up any data you want to keep.