diff --git a/mst/installation-mst.md b/mst/installation-mst.md index c6fa832374..63cfd4d609 100644 --- a/mst/installation-mst.md +++ b/mst/installation-mst.md @@ -108,6 +108,20 @@ Description | Enables scalable inserts and complex queries for time-series data defaultdb=> ``` +## Install and update TimescaleDB Toolkit + +Run this command on each database you want to use the $TOOLKIT_SHORT with: + +```sql +CREATE EXTENSION timescaledb_toolkit; +``` + +Update an installed version of the $TOOLKIT_SHORT using this command: + +```sql +ALTER EXTENSION timescaledb_toolkit UPDATE; +``` + ## Where to next Now that you have your first service up and running, you can check out the diff --git a/self-hosted/tooling/install-toolkit.md b/self-hosted/tooling/install-toolkit.md index 761a70e070..50ecdad66d 100644 --- a/self-hosted/tooling/install-toolkit.md +++ b/self-hosted/tooling/install-toolkit.md @@ -11,71 +11,64 @@ Some hyperfunctions are included by default in $TIMESCALE_DB. For additional hyperfunctions, you need to install the $TOOLKIT_LONG $PG extension. -If you're using [$CLOUD_LONG][cloud], the $TOOLKIT_LONG is already installed. +If you're using [$CLOUD_LONG][cloud], the $TOOLKIT_LONG is already installed. If you're hosting the $TIMESCALE_DB extension on your self-hosted database, you can install $TOOLKIT_SHORT by: -## Install and update TimescaleDB Toolkit on Managed Service for TimescaleDB +* Using the $TIMESCALE_DB high-availability Docker image +* Using a package manager such as `yum`, `apt`, or `brew` on platforms where + pre-built binaries are available +* Building from source. For more information, see the [$TOOLKIT_SHORT developer documentation][toolkit-gh-docs] -On [$MST_LONG][mst], run this command on each database you -want to use the $TOOLKIT_SHORT with: + -```sql -CREATE EXTENSION timescaledb_toolkit; -``` + -Update an installed version of the $TOOLKIT_SHORT using this command: +## Install $TOOLKIT_LONG -```sql -ALTER EXTENSION timescaledb_toolkit UPDATE; +Best practice for $TOOLKIT_SHORT installation is to use the +[TimescaleDB Docker image](https://github.com/timescale/timescaledb-docker-ha). +To get $TOOLKIT_SHORT, use the high availability image, `timescaledb-ha`: + +```bash +docker pull timescale/timescaledb-ha:pg17 ``` -## Install TimescaleDB Toolkit on self-hosted TimescaleDB +For more information on running $TIMESCALE_DB using Docker, see +[Install TimescaleDB from a Docker container][docker-install]. -If you're hosting the $TIMESCALE_DB extension on your self-hosted database, you can install $TOOLKIT_SHORT by: +## Update $TOOLKIT_LONG -* Using the TimescaleDB high-availability Docker image -* Using a package manager such as `yum`, `apt`, or `brew` on platforms where - pre-built binaries are available -* Building from source +To get the latest version of $TOOLKIT_SHORT, [update][update-docker] the $TIMESCALE_DB HA docker image. -### Install Docker image + -The recommended way to install the $TOOLKIT_SHORT is to use the -[TimescaleDB Docker image](https://github.com/timescale/timescaledb-docker-ha). -To get $TOOLKIT_SHORT, use the high availability image, `timescaledb-ha`: + -```bash -docker pull timescale/timescaledb-ha:pg17 -``` +## Prerequisites -For more information on running TimescaleDB using Docker, see the section on -[pre-built containers][docker-install]. +To follow this procedure: -### Install Toolkit on CentOS 7 and other Red Hat-based systems +- [Install $TIMESCALE_DB][debian-install]. +- Add the $TIMESCALE_DB repository and the GPG key. -These instructions use the `yum` package manager. They have been tested on -CentOS 7 and may also work on other Red Hat-based systems, such as Red Hat -Enterprise Linux and Fedora. +## Install $TOOLKIT_LONG - +These instructions use the `apt` package manager. -#### Installing Toolkit on CentOS 7 + -1. Make sure you have installed TimescaleDB and created a TimescaleDB - repository in your `yum` `repo.d` directory. For more information, see [the - instructions for Red Hat-based systems][red-hat-install]. 1. Update your local repository list: ```bash - yum update + sudo apt update ``` -1. Install $TOOLKIT_LONG: +1. Install TimescaleDB Toolkit: ```bash - yum install timescaledb-toolkit-postgresql-16 + sudo apt install timescaledb-toolkit-postgresql-17 ``` -1. Connect to the database where you want to use $TOOLKIT_SHORT. +1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. 1. Create the $TOOLKIT_SHORT extension in the database: ```sql @@ -84,68 +77,76 @@ Enterprise Linux and Fedora. -### Install Toolkit on Ubuntu and other Debian-based systems +## Update $TOOLKIT_LONG -These instructions use the `apt` package manager. They have been tested on Ubuntu 20.04 -and may also work on other Debian-based systems. +Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENSION`. -#### Installing Toolkit on Ubuntu 20.04 - -1. Make sure you have installed TimescaleDB and added the TimescaleDB - repository and GPG key. For more information, see [the instructions for - Debian-based systems][debian-install]. 1. Update your local repository list: ```bash apt update ``` -1. Install TimescaleDB Toolkit: +1. Install the latest version of $TOOLKIT_LONG: ```bash - apt install timescaledb-toolkit-postgresql-16 + apt install timescaledb-toolkit-postgresql-17 ``` -1. Connect to the database where you want to use $TOOLKIT_SHORT. -1. Create the $TOOLKIT_SHORT extension in the database: +1. [Connect to the database][connect] where you want to use the new version of $TOOLKIT_SHORT. +1. Update the $TOOLKIT_SHORT extension in the database: ```sql - CREATE EXTENSION timescaledb_toolkit; + ALTER EXTENSION timescaledb_toolkit UPDATE; ``` + + + For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active + sessions. + + + -### Install Toolkit on macOS + -These instructions use the `brew` package manager. For more information on -installing or using Homebrew, see [the `brew` homepage][brew-install]. + - +## Prerequisites -#### Installing Toolkit on macOS +To follow this procedure: -1. Tap the $COMPANY formula repository, which also contains formulae for - $TIMESCALE_DB and `timescaledb-tune`. +- [Install $TIMESCALE_DB][red-hat-install]. +- Create a $TIMESCALE_DB repository in your `yum` `repo.d` directory. + +## Install $TOOLKIT_LONG + +These instructions use the `yum` package manager. + + + +1. Set up the repository: ```bash - brew tap timescale/tap + curl -s https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | sudo bash ``` -1. Update your local brew installation: +1. Update your local repository list: ```bash - brew update + yum update ``` 1. Install $TOOLKIT_LONG: ```bash - brew install timescaledb-toolkit + yum install timescaledb-toolkit-postgresql-17 ``` -1. Connect to the database where you want to use $TOOLKIT_SHORT. +1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. 1. Create the $TOOLKIT_SHORT extension in the database: ```sql @@ -154,99 +155,122 @@ installing or using Homebrew, see [the `brew` homepage][brew-install]. -### Install Toolkit on Windows - -$TOOLKIT_LONG isn't currently supported on Windows. As a workaround, you -can run $PG in a Docker container. - -## Update Toolkit on self-hosted TimescaleDB +## Update $TOOLKIT_LONG Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENSION`. -### Updating Toolkit on self-hosted TimescaleDB - 1. Update your local repository list: - - - - ```bash yum update ``` - - - +1. Install the latest version of $TOOLKIT_LONG: ```bash - apt update + yum install timescaledb-toolkit-postgresql-17 ``` - - - +1. [Connect to the database][connect] where you want to use the new version of $TOOLKIT_SHORT. +1. Update the $TOOLKIT_SHORT extension in the database: - ```bash - brew update + ```sql + ALTER EXTENSION timescaledb_toolkit UPDATE; ``` - + - + For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active + sessions. -1. Install the latest version of $TOOLKIT_LONG: + + + + + - + - +## Prerequisites + +To follow this procedure: + +- [Install $TIMESCALE_DB][macos-install]. + +## Install $TOOLKIT_LONG + +These instructions use the `brew` package manager. For more information on +installing or using Homebrew, see [the `brew` homepage][brew-install]. + + + +1. Tap the $COMPANY formula repository, which also contains formulae for + $TIMESCALE_DB and `timescaledb-tune`. ```bash - yum install timescaledb-toolkit-postgresql-16 + brew tap timescale/tap ``` - +1. Update your local brew installation: - + ```bash + brew update + ``` + +1. Install $TOOLKIT_LONG: ```bash - apt install timescaledb-toolkit-postgresql-16 + brew install timescaledb-toolkit ``` - +1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. +1. Create the $TOOLKIT_SHORT extension in the database: + + ```sql + CREATE EXTENSION timescaledb_toolkit; + ``` + + - +## Update $TOOLKIT_LONG + +Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENSION`. + + + +1. Update your local repository list: ```bash - brew upgrade timescaledb-toolkit + brew update ``` - +1. Install the latest version of $TOOLKIT_LONG: - + ```bash + brew upgrade timescaledb-toolkit + ``` -1. Connect to the database where you want to use the new version of $TOOLKIT_SHORT. +1. [Connect to the database][connect] where you want to use the new version of $TOOLKIT_SHORT. 1. Update the $TOOLKIT_SHORT extension in the database: ```sql ALTER EXTENSION timescaledb_toolkit UPDATE; ``` - + -For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active -sessions. + For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active + sessions. - + + + -### Build Toolkit from source - -You can build $TOOLKIT_SHORT from source. For more information, see the [$TOOLKIT_SHORT -developer documentation][toolkit-gh-docs]. + [brew-install]: https://brew.sh [cloud]: /use-timescale/:currentVersion:/services/ @@ -255,3 +279,6 @@ developer documentation][toolkit-gh-docs]. [mst]: /mst/:currentVersion:/ [red-hat-install]: /self-hosted/:currentVersion:/install/installation-linux/ [toolkit-gh-docs]: https://github.com/timescale/timescaledb-toolkit#-installing-from-source +[connect]: /integrations/:currentVersion:/find-connection-details/ +[update-docker]: /self-hosted/:currentVersion:/upgrades/upgrade-docker/ +[macos-install]: /self-hosted/:currentVersion:/install/installation-macos/ \ No newline at end of file