From fa7f550aa924f82939c8e625ca5a9b29808f0be9 Mon Sep 17 00:00:00 2001 From: atovpeko Date: Wed, 26 Nov 2025 16:43:48 +0200 Subject: [PATCH 01/15] updates --- self-hosted/page-index/page-index.js | 32 +- self-hosted/uninstall/index.md | 16 +- self-hosted/uninstall/uninstall-docker.md | 121 +++++ self-hosted/uninstall/uninstall-kubernetes.md | 193 ++++++++ self-hosted/uninstall/uninstall-linux.md | 449 ++++++++++++++++++ self-hosted/uninstall/uninstall-source.md | 351 ++++++++++++++ self-hosted/uninstall/uninstall-windows.md | 159 +++++++ 7 files changed, 1317 insertions(+), 4 deletions(-) create mode 100644 self-hosted/uninstall/uninstall-docker.md create mode 100644 self-hosted/uninstall/uninstall-kubernetes.md create mode 100644 self-hosted/uninstall/uninstall-linux.md create mode 100644 self-hosted/uninstall/uninstall-source.md create mode 100644 self-hosted/uninstall/uninstall-windows.md diff --git a/self-hosted/page-index/page-index.js b/self-hosted/page-index/page-index.js index 77b2806dba..399fd782e9 100644 --- a/self-hosted/page-index/page-index.js +++ b/self-hosted/page-index/page-index.js @@ -220,9 +220,37 @@ module.exports = [ excerpt: "Uninstalling self-hosted TimescaleDB", children: [ { - title: "Uninstall self-hosted TimescaleDB on macOS", + title: "Docker", + href: "uninstall-docker", + excerpt: + "Uninstall self-hosted TimescaleDB from Docker", + }, + { + title: "Kubernetes", + href: "uninstall-kubernetes", + excerpt: "Uninstall self-hosted TimescaleDB from Kubernetes", + }, + { + title: "Linux", + href: "uninstall-linux", + excerpt: "Uninstall self-hosted TimescaleDB from Linux", + }, + { + title: "MacOS", href: "uninstall-timescaledb", - excerpt: "Uninstall self-hosted TimescaleDB on macOS", + excerpt: "Uninstall self-hosted TimescaleDB from MacOS", + }, + { + title: "Windows", + href: "uninstall-windows", + excerpt: + "Uninstall self-hosted TimescaleDB from Windows", + }, + { + title: "Source", + href: "uninstall-source", + excerpt: + "Uninstall self-hosted TimescaleDB installed from source", }, ], }, diff --git a/self-hosted/uninstall/index.md b/self-hosted/uninstall/index.md index 4fca286513..224aada757 100644 --- a/self-hosted/uninstall/index.md +++ b/self-hosted/uninstall/index.md @@ -10,6 +10,18 @@ keywords: [Uninstall] If you want to uninstall TimescaleDB because it does not meet your requirements, you can uninstall it without having to uninstall $PG. -* [Learn how to uninstall][uninstall-timescaledb] TimescaleDB in macOS +Choose your installation method to see the appropriate uninstallation instructions: -[uninstall-timescaledb]: /self-hosted/:currentVersion:/uninstall/ +* [Uninstall from Docker][uninstall-docker] - Remove TimescaleDB containers, images, and volumes +* [Uninstall from Kubernetes][uninstall-kubernetes] - Remove TimescaleDB from a Kubernetes cluster +* [Uninstall from Linux][uninstall-linux] - Remove TimescaleDB from Debian, Ubuntu, Red Hat, Fedora, Rocky Linux, or ArchLinux +* [Uninstall from macOS][uninstall-macos] - Remove TimescaleDB installed with Homebrew or MacPorts +* [Uninstall from Windows][uninstall-windows] - Remove TimescaleDB from Windows systems +* [Uninstall from source][uninstall-source] - Remove TimescaleDB built and installed from source code + +[uninstall-docker]: /self-hosted/:currentVersion:/uninstall/uninstall-docker/ +[uninstall-kubernetes]: /self-hosted/:currentVersion:/uninstall/uninstall-kubernetes/ +[uninstall-linux]: /self-hosted/:currentVersion:/uninstall/uninstall-linux/ +[uninstall-macos]: /self-hosted/:currentVersion:/uninstall/uninstall-timescaledb/ +[uninstall-windows]: /self-hosted/:currentVersion:/uninstall/uninstall-windows/ +[uninstall-source]: /self-hosted/:currentVersion:/uninstall/uninstall-source/ diff --git a/self-hosted/uninstall/uninstall-docker.md b/self-hosted/uninstall/uninstall-docker.md new file mode 100644 index 0000000000..11b88ee6be --- /dev/null +++ b/self-hosted/uninstall/uninstall-docker.md @@ -0,0 +1,121 @@ +--- +title: Uninstall TimescaleDB from Docker +excerpt: Uninstall TimescaleDB and PostgreSQL running in a Docker container +products: [self_hosted] +keywords: [uninstall, Docker] +--- + +# Uninstall TimescaleDB from Docker + +If you installed TimescaleDB using Docker, you can completely remove the TimescaleDB container, image, and optionally the data volumes. This guide covers uninstalling both the TimescaleDB-HA and TimescaleDB light Docker images. + + + +## Uninstalling TimescaleDB from Docker + +1. **Stop the running container** + + ```bash + docker stop timescaledb + ``` + + If you named your container differently when you created it, replace `timescaledb` with your container name. You can list all running containers with: + + ```bash + docker ps + ``` + +1. **Remove the container** + + ```bash + docker rm timescaledb + ``` + + This removes the container but preserves the data volume and the Docker image. + +1. **List and remove the Docker image** + + To see which TimescaleDB images you have installed: + + ```bash + docker images | grep timescale + ``` + + Remove the specific TimescaleDB image: + + ```bash + # For TimescaleDB-HA + docker rmi timescale/timescaledb-ha:pg17 + + # For TimescaleDB light + docker rmi timescale/timescaledb:latest-pg17 + ``` + + Replace `pg17` with your PostgreSQL version if different. + +1. **(Optional) Remove the data volume** + + + + This step permanently deletes all your database data. Only proceed if you're sure you no longer need this data or have backed it up. + + + + List all Docker volumes: + + ```bash + docker volume ls + ``` + + If you used a named volume when creating your container, remove it: + + ```bash + docker volume rm + ``` + + If you used a host directory mount (with the `-v :/pgdata` flag), you can manually delete that directory: + + ```bash + rm -rf + ``` + +1. **Verify removal** + + Confirm that the container, image, and volumes have been removed: + + ```bash + # Check for containers + docker ps -a | grep timescaledb + + # Check for images + docker images | grep timescale + + # Check for volumes + docker volume ls + ``` + + + +## Remove all unused Docker resources + +If you want to clean up all unused Docker resources (not just TimescaleDB), you can use: + +```bash +# Remove all stopped containers +docker container prune + +# Remove all unused images +docker image prune -a + +# Remove all unused volumes +docker volume prune + +# Remove all unused resources (containers, images, volumes, networks) +docker system prune -a --volumes +``` + + + +These commands will remove all unused Docker resources, not just TimescaleDB. Use with caution if you have other Docker containers or images you want to keep. + + diff --git a/self-hosted/uninstall/uninstall-kubernetes.md b/self-hosted/uninstall/uninstall-kubernetes.md new file mode 100644 index 0000000000..92e18a1144 --- /dev/null +++ b/self-hosted/uninstall/uninstall-kubernetes.md @@ -0,0 +1,193 @@ +--- +title: Uninstall TimescaleDB from Kubernetes +excerpt: Remove TimescaleDB resources from a Kubernetes cluster +products: [self_hosted] +keywords: [uninstall, Kubernetes] +--- + +# Uninstall TimescaleDB from Kubernetes + +If you deployed TimescaleDB on Kubernetes, you can completely remove all associated resources including the StatefulSet, Service, PersistentVolumeClaim, Secret, and application deployments. This guide shows you how to cleanly uninstall TimescaleDB from your Kubernetes cluster. + + + +## Uninstalling TimescaleDB from Kubernetes + +1. **Back up your data (optional but recommended)** + + Before uninstalling, back up any important data from your TimescaleDB instance: + + ```shell + kubectl exec -it timescaledb-0 -- pg_dump -U postgres postgres > backup.sql + ``` + + + + Deleting the PersistentVolumeClaim will permanently delete all your database data. Ensure you have backed up any data you need before proceeding. + + + +1. **Delete the test pod (if it exists)** + + If you created a test pod during installation: + + ```shell + kubectl delete pod test-pod + ``` + +1. **Delete the application deployment** + + Remove any application deployments that connect to TimescaleDB: + + ```shell + kubectl delete deployment timescale-app + ``` + +1. **Delete the TimescaleDB service** + + Remove the service that exposes TimescaleDB within the cluster: + + ```shell + kubectl delete service timescaledb + ``` + +1. **Delete the TimescaleDB StatefulSet** + + Remove the StatefulSet managing the TimescaleDB pods: + + ```shell + kubectl delete statefulset timescaledb + ``` + + This will terminate the TimescaleDB pod(s). + +1. **Delete the PersistentVolumeClaim** + + + + This step permanently deletes all database data stored in the persistent volume. + + + + ```shell + kubectl delete pvc timescale-pvc + ``` + +1. **Delete the secret** + + Remove the Kubernetes secret containing database credentials: + + ```shell + kubectl delete secret timescale-secret + ``` + +1. **(Optional) Delete the namespace** + + If you created a dedicated namespace for TimescaleDB and want to remove it: + + ```shell + kubectl delete namespace timescale + ``` + + + + Only delete the namespace if you're certain no other resources are using it. This will delete all resources in the namespace. + + + +1. **Verify removal** + + Confirm that all TimescaleDB resources have been deleted: + + ```shell + # Check for StatefulSets + kubectl get statefulsets + + # Check for Services + kubectl get services + + # Check for PVCs + kubectl get pvc + + # Check for Secrets + kubectl get secrets + + # Check for Pods + kubectl get pods + ``` + + TimescaleDB-related resources should not appear in these lists. + + + +## Uninstalling TimescaleDB installed with Kubernetes operators + +If you installed TimescaleDB using a Kubernetes operator (StackGres, Patroni, PGO, or CloudNativePG), follow the operator-specific uninstallation instructions: + +### StackGres + +```shell +kubectl delete sgcluster +kubectl delete sgpgconfig +``` + +For complete uninstallation: + +```shell +helm uninstall stackgres-operator --namespace stackgres +kubectl delete namespace stackgres +``` + +### PostgreSQL Operator (Patroni/Zalando) + +```shell +kubectl delete postgresql +``` + +To uninstall the operator: + +```shell +kubectl delete -f https://raw.githubusercontent.com/zalando/postgres-operator/master/manifests/postgresql-operator.yaml +``` + +### PGO (Crunchy Data) + +```shell +kubectl delete postgrescluster +``` + +To uninstall the operator: + +```shell +kubectl delete -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/master/installers/kubectl/postgres-operator.yml +``` + +### CloudNativePG + +```shell +kubectl delete cluster +``` + +To uninstall the operator: + +```shell +kubectl delete -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.23/releases/cnpg-1.23.0.yaml +``` + +## Clean up persistent volumes + +After deleting the PersistentVolumeClaim, you may also want to delete the associated PersistentVolume if it was manually provisioned: + +```shell +# List persistent volumes +kubectl get pv + +# Delete a specific persistent volume +kubectl delete pv +``` + + + +If you're using dynamic provisioning with a storage class, the PersistentVolume should be automatically deleted when you delete the PersistentVolumeClaim, depending on your reclaim policy. + + diff --git a/self-hosted/uninstall/uninstall-linux.md b/self-hosted/uninstall/uninstall-linux.md new file mode 100644 index 0000000000..c783414718 --- /dev/null +++ b/self-hosted/uninstall/uninstall-linux.md @@ -0,0 +1,449 @@ +--- +title: Uninstall TimescaleDB on Linux +excerpt: Uninstall TimescaleDB from Debian, Ubuntu, Red Hat, Fedora, Rocky Linux, or ArchLinux +products: [self_hosted] +keywords: [uninstall, Linux, Debian, Ubuntu, RHEL, Fedora] +--- + +# Uninstall TimescaleDB on Linux + +If you installed TimescaleDB on Linux using a package manager, you can uninstall it without removing PostgreSQL. This guide covers uninstalling TimescaleDB from Debian-based systems (Debian, Ubuntu) and Red Hat-based systems (RHEL, Fedora, Rocky Linux), as well as ArchLinux. + + + + + + + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the $PG configuration file: + + ```bash + sudo nano /etc/postgresql/17/main/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart $PG** + + ```bash + sudo systemctl restart postgresql + ``` + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo apt remove timescaledb-2-postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/apt/sources.list.d/timescaledb.list + sudo rm /etc/apt/trusted.gpg.d/timescaledb.gpg + ``` + +1. **Update the package list** + + ```bash + sudo apt update + ``` + +1. **(Optional) Remove TimescaleDB dependencies** + + If you want to remove packages that were installed as dependencies: + + ```bash + sudo apt autoremove + ``` + + + + + + + + + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the PostgreSQL configuration file: + + ```bash + sudo nano /etc/postgresql/17/main/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql + ``` + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo apt remove timescaledb-2-postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/apt/sources.list.d/timescaledb.list + sudo rm /etc/apt/trusted.gpg.d/timescaledb.gpg + ``` + + For Ubuntu 21.10 and earlier, also remove the old GPG key: + + ```bash + sudo apt-key del timescaledb 2>/dev/null || true + ``` + +1. **Update the package list** + + ```bash + sudo apt update + ``` + +1. **(Optional) Remove TimescaleDB dependencies** + + If you want to remove packages that were installed as dependencies: + + ```bash + sudo apt autoremove + ``` + + + + + + + + + +## Uninstalling TimescaleDB from Red Hat + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from shared_preload_libraries** + + Edit the PostgreSQL configuration file: + + ```bash + sudo vi /var/lib/pgsql/17/data/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo yum remove timescaledb-2-postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + + + + On some Red Hat systems, this command may try to remove `postgresql17-server` as an unused dependency. If you see PostgreSQL server in the removal list, type `N` to cancel. TimescaleDB is already functionally uninstalled (extension dropped and configuration removed), so leaving the packages installed is safe. + + + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/yum.repos.d/timescale_timescaledb.repo + ``` + +1. **Clean the YUM cache** + + ```bash + sudo yum clean all + ``` + + + + + + + + + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the PostgreSQL configuration file: + + ```bash + sudo vi /var/lib/pgsql/17/data/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo dnf remove timescaledb-2-postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + + + + On some Fedora systems, this command may try to remove `postgresql17-server` as an unused dependency. If you see PostgreSQL server in the removal list, type `N` to cancel. TimescaleDB is already functionally uninstalled (extension dropped and configuration removed), so leaving the packages installed is safe. + + + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/yum.repos.d/timescale_timescaledb.repo + ``` + +1. **Clean the DNF cache** + + ```bash + sudo dnf clean all + ``` + + + + + + + + + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the PostgreSQL configuration file: + + ```bash + sudo vi /var/lib/pgsql/17/data/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo yum remove timescaledb-2-postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/yum.repos.d/timescale_timescaledb.repo + ``` + +1. **Clean the YUM cache** + + ```bash + sudo yum clean all + ``` + + + + + + + diff --git a/self-hosted/uninstall/uninstall-source.md b/self-hosted/uninstall/uninstall-source.md new file mode 100644 index 0000000000..8c9271fba8 --- /dev/null +++ b/self-hosted/uninstall/uninstall-source.md @@ -0,0 +1,351 @@ +--- +title: Uninstall TimescaleDB installed from source +excerpt: Uninstall TimescaleDB that was built and installed from source code +products: [self_hosted] +keywords: [uninstall, source] +--- + +# Uninstall TimescaleDB installed from source + +If you installed TimescaleDB by building from source, you can uninstall it without removing PostgreSQL. This guide shows you how to remove TimescaleDB that was compiled and installed from the source code. + + + + + + + +## Uninstalling TimescaleDB on Linux + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from shared_preload_libraries** + + Locate your PostgreSQL configuration file: + + ```bash + psql -d postgres -c "SHOW config_file;" + ``` + + Edit the configuration file (you may need sudo privileges): + + ```bash + sudo nano /path/to/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + + Save the file. + +1. **Restart PostgreSQL** + + ```bash + sudo service postgresql restart + ``` + + Or, depending on your system: + + ```bash + sudo systemctl restart postgresql + ``` + +1. **Uninstall the TimescaleDB binaries** + + Navigate to your TimescaleDB build directory: + + ```bash + cd /path/to/timescaledb/build + ``` + + Uninstall the files: + + ```bash + sudo make uninstall + ``` + + + + If you no longer have the build directory, you'll need to manually remove the TimescaleDB files from your PostgreSQL installation directory. + + + +1. **Manually remove TimescaleDB files (if make uninstall fails)** + + If the `make uninstall` command doesn't work, manually remove the files: + + Find your PostgreSQL library directory: + + ```bash + pg_config --pkglibdir + ``` + + Remove TimescaleDB library files: + + ```bash + sudo rm $(pg_config --pkglibdir)/timescaledb*.so + ``` + + Find your PostgreSQL extension directory: + + ```bash + pg_config --sharedir + ``` + + Remove TimescaleDB extension files: + + ```bash + sudo rm -rf $(pg_config --sharedir)/extension/timescaledb* + ``` + +1. **(Optional) Remove the TimescaleDB source directory** + + If you no longer need the source code: + + ```bash + cd /path/to/parent/directory + rm -rf timescaledb + ``` + +1. **Verify removal** + + Connect to PostgreSQL and check that the extension is not available: + + ```bash + psql -U postgres + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. + + + + + + + + + +## Uninstalling TimescaleDB on Windows + +1. **Drop the TimescaleDB extension from your databases** + + Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: + + ```powershell + psql -U postgres -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from shared_preload_libraries** + + Locate your PostgreSQL configuration file: + + ```powershell + psql -U postgres -d postgres -c "SHOW config_file;" + ``` + + Open the configuration file in a text editor (you may need Administrator privileges). The default location is: + + ``` + C:\Program Files\PostgreSQL\\data\postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + + Save the file. + +1. **Restart PostgreSQL** + + Open Services (press `Win + R`, type `services.msc`, and press Enter). + + Find the PostgreSQL service, right-click it, and select `Restart`. + + Alternatively, from an Administrator Command Prompt or PowerShell: + + ```powershell + pg_ctl restart + ``` + +1. **Uninstall the TimescaleDB binaries** + + Navigate to your TimescaleDB build directory: + + ```powershell + cd \path\to\timescaledb\build + ``` + + Uninstall the files: + + ```powershell + cmake --build . --config Release --target uninstall + ``` + + + + If you no longer have the build directory, you'll need to manually remove the TimescaleDB files from your PostgreSQL installation directory. + + + +1. **Manually remove TimescaleDB files (if cmake uninstall fails)** + + If the cmake uninstall command doesn't work, manually remove the files. + + Find your PostgreSQL library directory: + + ```powershell + pg_config --pkglibdir + ``` + + Remove TimescaleDB DLL files: + + ```powershell + del "C:\Program Files\PostgreSQL\\lib\timescaledb*.dll" + ``` + + Find your PostgreSQL extension directory: + + ```powershell + pg_config --sharedir + ``` + + Remove TimescaleDB extension files: + + ```powershell + rmdir /s "C:\Program Files\PostgreSQL\\share\extension\timescaledb*" + ``` + + You may need Administrator privileges to delete these files. + +1. **(Optional) Remove the TimescaleDB source directory** + + If you no longer need the source code: + + ```powershell + cd \path\to\parent\directory + rmdir /s timescaledb + ``` + +1. **Verify removal** + + Connect to PostgreSQL and check that the extension is not available: + + ```powershell + psql -U postgres + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. + + + + + + + +## Additional cleanup + +After uninstalling, you may want to remove any additional TimescaleDB-related files: + +### Remove TimescaleDB tools + +If you installed `timescaledb-tune` or other tools from source, remove them: + +**Linux:** +```bash +# Find where timescaledb-tune is installed +which timescaledb-tune + +# Remove it +sudo rm $(which timescaledb-tune) +``` + +**Windows:** +```powershell +# Find where timescaledb-tune is installed +where timescaledb-tune + +# Remove it +del "path\to\timescaledb-tune.exe" +``` + +### Clean up environment variables + +If you added TimescaleDB paths to your `PATH` environment variable during installation, remove them: + +**Linux:** +Edit your shell configuration file (`~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`) and remove any TimescaleDB-related PATH entries. + +**Windows:** +1. Search for "environment variables" in the Windows Search tool +1. Click `Edit the system environment variables` +1. Click `Environment Variables` +1. Under `System variables` or `User variables`, select `Path` and click `Edit` +1. Remove any entries related to TimescaleDB +1. Click `OK` to save diff --git a/self-hosted/uninstall/uninstall-windows.md b/self-hosted/uninstall/uninstall-windows.md new file mode 100644 index 0000000000..94ef3dfa04 --- /dev/null +++ b/self-hosted/uninstall/uninstall-windows.md @@ -0,0 +1,159 @@ +--- +title: Uninstall TimescaleDB on Windows +excerpt: Uninstall TimescaleDB from Windows without removing PostgreSQL +products: [self_hosted] +keywords: [uninstall, Windows] +--- + +# Uninstall TimescaleDB on Windows + +If you installed TimescaleDB on Windows, you can uninstall it without removing PostgreSQL. This guide shows you how to completely remove TimescaleDB from your Windows system. + + + +## Uninstalling TimescaleDB from Windows + +1. **Drop the TimescaleDB extension from your databases** + + Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: + + ```bash + psql -U postgres -d + ``` + + At the `psql` prompt, remove the extension: + + ```sql + DROP EXTENSION IF EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from shared_preload_libraries** + + Locate your PostgreSQL configuration file. The default location is: + + ``` + C:\Program Files\PostgreSQL\\data\postgresql.conf + ``` + + Open the file in a text editor (you may need to run the editor as Administrator). + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + + Save the file. + +1. **Restart the PostgreSQL service** + + Open Services (press `Win + R`, type `services.msc`, and press Enter). + + Find the PostgreSQL service (usually named `postgresql-x64-`), right-click it, and select `Restart`. + + Alternatively, from an Administrator Command Prompt or PowerShell: + + ```powershell + net stop postgresql-x64- + net start postgresql-x64- + ``` + + Replace `` with your PostgreSQL version number (for example, `17`). + +1. **Uninstall TimescaleDB** + + 1. Open the Windows Control Panel: + - Press `Win + R`, type `control`, and press Enter + - Or search for "Control Panel" in the Start menu + + 1. Navigate to `Programs and Features` (or `Apps & features` in Windows 10/11) + + 1. Find `TimescaleDB` in the list of installed programs + + 1. Right-click `TimescaleDB` and select `Uninstall`, or click `Uninstall/Change` + + 1. Follow the uninstallation wizard to complete the process + + Alternatively, you can uninstall from PowerShell (run as Administrator): + + ```powershell + Get-WmiObject -Class Win32_Product -Filter "Name LIKE '%TimescaleDB%'" | ForEach-Object { $_.Uninstall() } + ``` + +1. **Remove TimescaleDB files manually (if needed)** + + If the uninstaller doesn't remove all files, manually delete the TimescaleDB directory: + + ``` + C:\Program Files\PostgreSQL\\lib\timescaledb* + C:\Program Files\PostgreSQL\\share\extension\timescaledb* + ``` + + You may need Administrator privileges to delete these files. + +1. **Remove TimescaleDB tools (if installed)** + + If you installed `timescaledb-tune` or other TimescaleDB tools separately, uninstall them through Programs and Features or delete them manually. + +1. **Clean up the system PATH (optional)** + + If TimescaleDB added any directories to your system PATH: + + 1. Search for "environment variables" in the Windows Search tool + 1. Click `Edit the system environment variables` + 1. Click `Environment Variables` + 1. Under `System variables`, select `Path` and click `Edit` + 1. Remove any entries related to TimescaleDB + 1. Click `OK` to save + + + +## Verify uninstallation + +After completing the uninstallation steps, verify that TimescaleDB has been removed: + +1. **Check that the extension is not loaded** + + Connect to PostgreSQL: + + ```bash + psql -U postgres + ``` + + List installed extensions: + + ```sql + \dx + ``` + + TimescaleDB should not appear in the list. You should only see default PostgreSQL extensions like `plpgsql`. + +1. **Verify the files are removed** + + Check that the TimescaleDB DLL files are no longer in the PostgreSQL directory: + + ```powershell + dir "C:\Program Files\PostgreSQL\*\lib\timescaledb*" + ``` + + This command should return no results if TimescaleDB has been successfully uninstalled. + +1. **Check Programs and Features** + + Open `Programs and Features` and verify that TimescaleDB is no longer listed. From bedbca114420c9fbbb25bdc9f227cdd9f7ce0341 Mon Sep 17 00:00:00 2001 From: atovpeko Date: Thu, 27 Nov 2025 15:11:36 +0200 Subject: [PATCH 02/15] windows tested --- .../_install-self-hosted-windows-based.mdx | 23 +++--- self-hosted/uninstall/uninstall-windows.md | 77 ++----------------- 2 files changed, 15 insertions(+), 85 deletions(-) diff --git a/_partials/_install-self-hosted-windows-based.mdx b/_partials/_install-self-hosted-windows-based.mdx index 5740c67e0a..a56d62ea7a 100644 --- a/_partials/_install-self-hosted-windows-based.mdx +++ b/_partials/_install-self-hosted-windows-based.mdx @@ -25,28 +25,25 @@ 1. Complete the installation wizard. + During installation, the wizard will prompt you to run the `timescaledb-tune` script to optimize your $PG configuration. It is recommended to accept this option. For more information, see [configuration][config]. + If you see an error like `could not load library "C:/Program Files/PostgreSQL/17/lib/timescaledb-2.17.2.dll": The specified module could not be found.`, use [Dependencies][dependencies] to ensure that your system can find the compatible DLLs for this release of TimescaleDB. -1. **Tune your $PG instance for TimescaleDB** - - Run the `timescaledb-tune` script included in the `timescaledb-tools` package with TimescaleDB. For more - information, see [configuration][config]. +1. **Restart the $PG service** -1. **Log in to $PG as `postgres`** + After installation, restart $PG for the changes to take effect. - ```bash - sudo -u postgres psql - ``` - You are in the psql shell. + Open Services (press `Win + R`, type `services.msc`, and press Enter). Find the PostgreSQL service (usually named `postgresql-x64-`), right-click it, and select `Restart`. -1. **Set the password for `postgres`** + Alternatively, from an Administrator Command Prompt or PowerShell: - ```bash - \password postgres + ```powershell + net stop postgresql-x64- + net start postgresql-x64- ``` - When you have set the password, type `\q` to exit psql. + Replace `` with your PostgreSQL version number (for example, `17`). diff --git a/self-hosted/uninstall/uninstall-windows.md b/self-hosted/uninstall/uninstall-windows.md index 94ef3dfa04..9d851164fb 100644 --- a/self-hosted/uninstall/uninstall-windows.md +++ b/self-hosted/uninstall/uninstall-windows.md @@ -76,84 +76,17 @@ If you installed TimescaleDB on Windows, you can uninstall it without removing P Replace `` with your PostgreSQL version number (for example, `17`). -1. **Uninstall TimescaleDB** +1. **Remove TimescaleDB files** - 1. Open the Windows Control Panel: - - Press `Win + R`, type `control`, and press Enter - - Or search for "Control Panel" in the Start menu - - 1. Navigate to `Programs and Features` (or `Apps & features` in Windows 10/11) - - 1. Find `TimescaleDB` in the list of installed programs - - 1. Right-click `TimescaleDB` and select `Uninstall`, or click `Uninstall/Change` - - 1. Follow the uninstallation wizard to complete the process - - Alternatively, you can uninstall from PowerShell (run as Administrator): + Open PowerShell as Administrator and manually delete the TimescaleDB library and extension files: ```powershell - Get-WmiObject -Class Win32_Product -Filter "Name LIKE '%TimescaleDB%'" | ForEach-Object { $_.Uninstall() } + Remove-Item "C:\Program Files\PostgreSQL\\lib\timescaledb*" + Remove-Item "C:\Program Files\PostgreSQL\\share\extension\timescaledb*" ``` -1. **Remove TimescaleDB files manually (if needed)** - - If the uninstaller doesn't remove all files, manually delete the TimescaleDB directory: - - ``` - C:\Program Files\PostgreSQL\\lib\timescaledb* - C:\Program Files\PostgreSQL\\share\extension\timescaledb* - ``` - - You may need Administrator privileges to delete these files. - -1. **Remove TimescaleDB tools (if installed)** - - If you installed `timescaledb-tune` or other TimescaleDB tools separately, uninstall them through Programs and Features or delete them manually. - -1. **Clean up the system PATH (optional)** - - If TimescaleDB added any directories to your system PATH: - - 1. Search for "environment variables" in the Windows Search tool - 1. Click `Edit the system environment variables` - 1. Click `Environment Variables` - 1. Under `System variables`, select `Path` and click `Edit` - 1. Remove any entries related to TimescaleDB - 1. Click `OK` to save + Replace `` with your PostgreSQL version number (for example, `17`). -## Verify uninstallation - -After completing the uninstallation steps, verify that TimescaleDB has been removed: - -1. **Check that the extension is not loaded** - - Connect to PostgreSQL: - - ```bash - psql -U postgres - ``` - - List installed extensions: - - ```sql - \dx - ``` - - TimescaleDB should not appear in the list. You should only see default PostgreSQL extensions like `plpgsql`. - -1. **Verify the files are removed** - - Check that the TimescaleDB DLL files are no longer in the PostgreSQL directory: - - ```powershell - dir "C:\Program Files\PostgreSQL\*\lib\timescaledb*" - ``` - - This command should return no results if TimescaleDB has been successfully uninstalled. - -1. **Check Programs and Features** - Open `Programs and Features` and verify that TimescaleDB is no longer listed. From 421d3234994dbe0dd2fa70cb9f87c2f113721ea8 Mon Sep 17 00:00:00 2001 From: atovpeko Date: Fri, 28 Nov 2025 17:29:36 +0200 Subject: [PATCH 03/15] draft --- .../_install-self-hosted-docker-based.mdx | 18 +- self-hosted/page-index/page-index.js | 37 +- self-hosted/uninstall.md | 1290 +++++++++++++++++ self-hosted/uninstall/index.md | 27 - self-hosted/uninstall/uninstall-docker.md | 121 -- self-hosted/uninstall/uninstall-kubernetes.md | 193 --- self-hosted/uninstall/uninstall-linux.md | 449 ------ self-hosted/uninstall/uninstall-source.md | 351 ----- .../uninstall/uninstall-timescaledb.md | 113 -- self-hosted/uninstall/uninstall-windows.md | 92 -- 10 files changed, 1306 insertions(+), 1385 deletions(-) create mode 100644 self-hosted/uninstall.md delete mode 100644 self-hosted/uninstall/index.md delete mode 100644 self-hosted/uninstall/uninstall-docker.md delete mode 100644 self-hosted/uninstall/uninstall-kubernetes.md delete mode 100644 self-hosted/uninstall/uninstall-linux.md delete mode 100644 self-hosted/uninstall/uninstall-source.md delete mode 100644 self-hosted/uninstall/uninstall-timescaledb.md delete mode 100644 self-hosted/uninstall/uninstall-windows.md diff --git a/_partials/_install-self-hosted-docker-based.mdx b/_partials/_install-self-hosted-docker-based.mdx index dd53d68325..bcef817d72 100644 --- a/_partials/_install-self-hosted-docker-based.mdx +++ b/_partials/_install-self-hosted-docker-based.mdx @@ -24,9 +24,13 @@ ``` docker run -d --name timescaledb -p 5432:5432 -v :/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg17 ``` - + If you are running multiple container instances, change the port each Docker instance runs on. + + If you have a local $PG instance already running on port 5432, change the Docker port mapping to avoid conflicts. For example, use `-p 5433:5432` and adjust the connection string accordingly. + + On UNIX-based systems, Docker modifies Linux IP tables to bind the container. If your system uses Linux Uncomplicated Firewall (UFW), Docker may [override your UFW port binding settings][override-binding]. To prevent this, add `DOCKER_OPTS="--iptables=false"` to `/etc/default/docker`. @@ -35,9 +39,11 @@ The default user and database are both `postgres`. You set the password in `POSTGRES_PASSWORD` in the previous step. The default command to connect to $PG is: ```bash - psql -d "postgres://postgres:password@localhost/postgres" + psql -d "postgres://postgres:password@127.0.0.1:5432/postgres" ``` + If you changed the port mapping in step 2 (e.g., to 5433), update the port in the connection string accordingly. + 1. **Check that $TIMESCALE_DB is installed** ```sql @@ -120,6 +126,10 @@ information, see the [Docker documentation on logs][docker-logs]. If you are running multiple container instances, change the port each Docker instance runs on. + + If you have a local $PG instance already running on port 5432, change the Docker port mapping to avoid conflicts. For example, use `-p 5433:5432` and adjust the connection string accordingly. + + On UNIX-based systems, Docker modifies Linux IP tables to bind the container. If your system uses Linux Uncomplicated Firewall (UFW), Docker may [override your UFW port binding settings][override-binding]. To prevent this, add `DOCKER_OPTS="--iptables=false"` to `/etc/default/docker`. 1. **Connect to a database on your $PG instance** @@ -127,9 +137,11 @@ information, see the [Docker documentation on logs][docker-logs]. The default user and database are both `postgres`. You set the password in `POSTGRES_PASSWORD` in the previous step. The default command to connect to $PG in this image is: ```bash - psql -d "postgres://postgres:password@localhost/postgres" + psql -d "postgres://postgres:password@127.0.0.1:5432/postgres" ``` + If you changed the port mapping in step 2 (e.g., to 5433), update the port in the connection string accordingly. + 1. **Check that $TIMESCALE_DB is installed** ```sql diff --git a/self-hosted/page-index/page-index.js b/self-hosted/page-index/page-index.js index 399fd782e9..c3bbc1c60a 100644 --- a/self-hosted/page-index/page-index.js +++ b/self-hosted/page-index/page-index.js @@ -217,42 +217,7 @@ module.exports = [ { title: "Uninstall self-hosted TimescaleDB", href: "uninstall", - excerpt: "Uninstalling self-hosted TimescaleDB", - children: [ - { - title: "Docker", - href: "uninstall-docker", - excerpt: - "Uninstall self-hosted TimescaleDB from Docker", - }, - { - title: "Kubernetes", - href: "uninstall-kubernetes", - excerpt: "Uninstall self-hosted TimescaleDB from Kubernetes", - }, - { - title: "Linux", - href: "uninstall-linux", - excerpt: "Uninstall self-hosted TimescaleDB from Linux", - }, - { - title: "MacOS", - href: "uninstall-timescaledb", - excerpt: "Uninstall self-hosted TimescaleDB from MacOS", - }, - { - title: "Windows", - href: "uninstall-windows", - excerpt: - "Uninstall self-hosted TimescaleDB from Windows", - }, - { - title: "Source", - href: "uninstall-source", - excerpt: - "Uninstall self-hosted TimescaleDB installed from source", - }, - ], + excerpt: "Uninstall self-hosted TimescaleDB without removing PostgreSQL", }, { title: "Troubleshooting self-hosted TimescaleDB", diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md new file mode 100644 index 0000000000..dead695542 --- /dev/null +++ b/self-hosted/uninstall.md @@ -0,0 +1,1290 @@ +--- +title: Uninstall TimescaleDB +excerpt: Uninstall TimescaleDB without uninstalling PostgreSQL +products: [self_hosted] +keywords: [uninstall] +--- + +# Uninstall TimescaleDB + +If you want to uninstall TimescaleDB, you can do so without having to uninstall PostgreSQL. Choose your platform or installation method below to see the appropriate uninstallation instructions. + + + + + +If you installed TimescaleDB using Docker, you can completely remove the TimescaleDB container, image, and optionally the data volumes. + + + +## Uninstalling TimescaleDB from Docker + +1. **Stop the running container** + + ```bash + docker stop timescaledb + ``` + + If you named your container differently when you created it, replace `timescaledb` with your container name. You can list all running containers with: + + ```bash + docker ps + ``` + +1. **Remove the container** + + ```bash + docker rm timescaledb + ``` + + This removes the container but preserves the data volume and the Docker image. + +1. **List and remove the Docker image** + + To see which TimescaleDB images you have installed: + + ```bash + docker images | grep timescale + ``` + + Remove the specific TimescaleDB image: + + ```bash + # For TimescaleDB-HA + docker rmi timescale/timescaledb-ha:pg17 + + # For TimescaleDB light + docker rmi timescale/timescaledb:latest-pg17 + ``` + + Replace `pg17` with your PostgreSQL version if different. + +1. **(Optional) Remove the data volume** + + + + This step permanently deletes all your database data. Only proceed if you're sure you no longer need this data or have backed it up. + + + + List all Docker volumes: + + ```bash + docker volume ls + ``` + + If you used a named volume when creating your container, remove it: + + ```bash + docker volume rm + ``` + + If you used a host directory mount (with the `-v :/pgdata` flag), you can manually delete that directory: + + ```bash + rm -rf + ``` + +1. **Verify removal** + + Confirm that the container, image, and volumes have been removed: + + ```bash + # Check for containers + docker ps -a | grep timescaledb + + # Check for images + docker images | grep timescale + + # Check for volumes + docker volume ls + ``` + + + +### Remove all unused Docker resources + +If you want to clean up all unused Docker resources (not just TimescaleDB), you can use: + +```bash +# Remove all stopped containers +docker container prune + +# Remove all unused images +docker image prune -a + +# Remove all unused volumes +docker volume prune + +# Remove all unused resources (containers, images, volumes, networks) +docker system prune -a --volumes +``` + + + +These commands will remove all unused Docker resources, not just TimescaleDB. Use with caution if you have other Docker containers or images you want to keep. + + + + + + + +If you deployed TimescaleDB on Kubernetes, you can completely remove all associated resources including the StatefulSet, Service, PersistentVolumeClaim, Secret, and application deployments. + + + +## Uninstalling TimescaleDB from Kubernetes + +1. **Back up your data (optional but recommended)** + + Before uninstalling, back up any important data from your TimescaleDB instance: + + ```shell + kubectl exec -it timescaledb-0 -- pg_dump -U postgres postgres > backup.sql + ``` + + + + Deleting the PersistentVolumeClaim will permanently delete all your database data. Ensure you have backed up any data you need before proceeding. + + + +1. **Delete the test pod (if it exists)** + + If you created a test pod during installation: + + ```shell + kubectl delete pod test-pod + ``` + +1. **Delete the application deployment** + + Remove any application deployments that connect to TimescaleDB: + + ```shell + kubectl delete deployment timescale-app + ``` + +1. **Delete the TimescaleDB service** + + Remove the service that exposes TimescaleDB within the cluster: + + ```shell + kubectl delete service timescaledb + ``` + +1. **Delete the TimescaleDB StatefulSet** + + Remove the StatefulSet managing the TimescaleDB pods: + + ```shell + kubectl delete statefulset timescaledb + ``` + + This will terminate the TimescaleDB pod(s). + +1. **Delete the PersistentVolumeClaim** + + + + This step permanently deletes all database data stored in the persistent volume. + + + + ```shell + kubectl delete pvc timescale-pvc + ``` + +1. **Delete the secret** + + Remove the Kubernetes secret containing database credentials: + + ```shell + kubectl delete secret timescale-secret + ``` + +1. **(Optional) Delete the namespace** + + If you created a dedicated namespace for TimescaleDB and want to remove it: + + ```shell + kubectl delete namespace timescale + ``` + + + + Only delete the namespace if you're certain no other resources are using it. This will delete all resources in the namespace. + + + +1. **Verify removal** + + Confirm that all TimescaleDB resources have been deleted: + + ```shell + # Check for StatefulSets + kubectl get statefulsets + + # Check for Services + kubectl get services + + # Check for PVCs + kubectl get pvc + + # Check for Secrets + kubectl get secrets + + # Check for Pods + kubectl get pods + ``` + + TimescaleDB-related resources should not appear in these lists. + + + +### Uninstalling TimescaleDB installed with Kubernetes operators + +If you installed TimescaleDB using a Kubernetes operator (StackGres, Patroni, PGO, or CloudNativePG), follow the operator-specific uninstallation instructions: + +**StackGres** + +```shell +kubectl delete sgcluster +kubectl delete sgpgconfig +``` + +For complete uninstallation: + +```shell +helm uninstall stackgres-operator --namespace stackgres +kubectl delete namespace stackgres +``` + +**PostgreSQL Operator (Patroni/Zalando)** + +```shell +kubectl delete postgresql +``` + +To uninstall the operator: + +```shell +kubectl delete -f https://raw.githubusercontent.com/zalando/postgres-operator/master/manifests/postgresql-operator.yaml +``` + +**PGO (Crunchy Data)** + +```shell +kubectl delete postgrescluster +``` + +To uninstall the operator: + +```shell +kubectl delete -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/master/installers/kubectl/postgres-operator.yml +``` + +**CloudNativePG** + +```shell +kubectl delete cluster +``` + +To uninstall the operator: + +```shell +kubectl delete -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.23/releases/cnpg-1.23.0.yaml +``` + +### Clean up persistent volumes + +After deleting the PersistentVolumeClaim, you may also want to delete the associated PersistentVolume if it was manually provisioned: + +```shell +# List persistent volumes +kubectl get pv + +# Delete a specific persistent volume +kubectl delete pv +``` + + + +If you're using dynamic provisioning with a storage class, the PersistentVolume should be automatically deleted when you delete the PersistentVolumeClaim, depending on your reclaim policy. + + + + + + + + + + + + + +## Uninstalling TimescaleDB from Debian + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the PostgreSQL configuration file: + + ```bash + sudo nano /etc/postgresql/17/main/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql + ``` + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo apt remove timescaledb-2-postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/apt/sources.list.d/timescaledb.list + sudo rm /etc/apt/trusted.gpg.d/timescaledb.gpg + sudo apt update + ``` + +1. **(Optional) Remove dependencies** + + To also remove unused dependencies: + + ```bash + sudo apt autoremove + ``` + +1. **Verify removal** + + Connect to PostgreSQL and verify the extension is no longer available: + + ```bash + psql -U postgres -d + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. + + + + + + + + + +## Uninstalling TimescaleDB from Ubuntu + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the PostgreSQL configuration file: + + ```bash + sudo nano /etc/postgresql/17/main/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql + ``` + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo apt remove timescaledb-2-postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/apt/sources.list.d/timescaledb.list + sudo rm /etc/apt/trusted.gpg.d/timescaledb.gpg + sudo apt update + ``` + +1. **(Optional) Remove dependencies** + + To also remove unused dependencies: + + ```bash + sudo apt autoremove + ``` + +1. **Verify removal** + + Connect to PostgreSQL and verify the extension is no longer available: + + ```bash + psql -U postgres -d + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. + + + + + + + + + +## Uninstalling TimescaleDB from RHEL + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the PostgreSQL configuration file: + + ```bash + sudo nano /var/lib/pgsql/17/data/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo dnf remove timescaledb_17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/yum.repos.d/timescaledb.repo + ``` + +1. **(Optional) Remove dependencies** + + To also remove unused dependencies: + + ```bash + sudo dnf autoremove + ``` + +1. **Verify removal** + + Connect to PostgreSQL and verify the extension is no longer available: + + ```bash + psql -U postgres -d + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. + + + + + + + + + +## Uninstalling TimescaleDB from Fedora + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the PostgreSQL configuration file: + + ```bash + sudo nano /var/lib/pgsql/17/data/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo dnf remove timescaledb_17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/yum.repos.d/timescaledb.repo + ``` + +1. **(Optional) Remove dependencies** + + To also remove unused dependencies: + + ```bash + sudo dnf autoremove + ``` + +1. **Verify removal** + + Connect to PostgreSQL and verify the extension is no longer available: + + ```bash + psql -U postgres -d + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. + + + + + + + + + +## Uninstalling TimescaleDB from Rocky Linux + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + ```bash + sudo -u postgres psql -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from `shared_preload_libraries`** + + Edit the PostgreSQL configuration file: + + ```bash + sudo nano /var/lib/pgsql/17/data/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + +1. **Restart PostgreSQL** + + ```bash + sudo systemctl restart postgresql-17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Uninstall the TimescaleDB package** + + ```bash + sudo dnf remove timescaledb_17 + ``` + + Replace `17` with your PostgreSQL version if different. + +1. **Remove the TimescaleDB repository configuration** + + ```bash + sudo rm /etc/yum.repos.d/timescaledb.repo + ``` + +1. **(Optional) Remove dependencies** + + To also remove unused dependencies: + + ```bash + sudo dnf autoremove + ``` + +1. **Verify removal** + + Connect to PostgreSQL and verify the extension is no longer available: + + ```bash + psql -U postgres -d + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. + + + + + + + + + + + +If you installed TimescaleDB on Windows using a package manager, you can uninstall it without removing PostgreSQL. + + + +## Uninstalling TimescaleDB from Windows + +1. **Drop the TimescaleDB extension from your databases** + + Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: + + ```bash + psql -U postgres -d + ``` + + At the `psql` prompt, remove the extension: + + ```sql + DROP EXTENSION IF EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from shared_preload_libraries** + + Locate your PostgreSQL configuration file. The default location is: + + ``` + C:\Program Files\PostgreSQL\\data\postgresql.conf + ``` + + Open the file in a text editor (you may need to run the editor as Administrator). + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + + Save the file. + +1. **Restart PostgreSQL** + + Open Services (press `Win + R`, type `services.msc`, and press Enter). + + Find the PostgreSQL service, right-click it, and select `Restart`. + + Alternatively, from an Administrator Command Prompt or PowerShell: + + ```powershell + pg_ctl restart + ``` + +1. **Uninstall TimescaleDB** + + Open Control Panel and navigate to "Programs and Features" or "Add or Remove Programs". + + Find "TimescaleDB" in the list of installed programs, select it, and click "Uninstall". + + Follow the uninstaller prompts to complete the removal. + +1. **Verify removal** + + Connect to PostgreSQL and check that the extension is not available: + + ```powershell + psql -U postgres + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. + + + + + + + + + + + + + +## Uninstalling TimescaleDB using Homebrew + +1. **Drop the TimescaleDB extension from your databases** + + At the `psql` prompt, remove the TimescaleDB extension: + + ```sql + DROP EXTENSION timescaledb; + ``` + +1. **Remove TimescaleDB from shared_preload_libraries** + + At the command prompt, remove `timescaledb` from `shared_preload_libraries` in the `postgresql.conf` configuration file: + + ```bash + nano /opt/homebrew/var/postgresql@14/postgresql.conf + shared_preload_libraries = '' + ``` + +1. **Save the changes** to the `postgresql.conf` file. + +1. **Restart PostgreSQL** + + ```bash + brew services restart postgresql + ``` + +1. **Verify the extension is uninstalled** + + Check that the TimescaleDB extension is uninstalled by using the `\dx` command at the `psql` prompt. Output is similar to: + + ```sql + tsdb-# \dx + List of installed extensions + Name | Version | Schema | Description + -------------+---------+------------+------------------------------------------------------------------- + plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language + (1 row) + ``` + +1. **Uninstall TimescaleDB** + + ```bash + brew uninstall timescaledb + ``` + +1. **Remove all the dependencies and related files** + + ```bash + brew remove timescaledb + ``` + + + + + + + + + +## Uninstalling TimescaleDB using MacPorts + +1. **Drop the TimescaleDB extension from your databases** + + At the `psql` prompt, remove the TimescaleDB extension: + + ```sql + DROP EXTENSION timescaledb; + ``` + +1. **Remove TimescaleDB from shared_preload_libraries** + + At the command prompt, remove `timescaledb` from `shared_preload_libraries` in the `postgresql.conf` configuration file: + + ```bash + nano /opt/homebrew/var/postgresql@14/postgresql.conf + shared_preload_libraries = '' + ``` + +1. **Save the changes** to the `postgresql.conf` file. + +1. **Restart PostgreSQL** + + ```bash + port reload postgresql + ``` + +1. **Verify the extension is uninstalled** + + Check that the TimescaleDB extension is uninstalled by using the `\dx` command at the `psql` prompt. Output is similar to: + + ```sql + tsdb-# \dx + List of installed extensions + Name | Version | Schema | Description + -------------+---------+------------+------------------------------------------------------------------- + plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language + (1 row) + ``` + +1. **Uninstall TimescaleDB and the related dependencies** + + ```bash + port uninstall timescaledb --follow-dependencies + ``` + + + + + + + + + + + +If you installed TimescaleDB by building from source, you can uninstall it without removing PostgreSQL. + + + +## Uninstalling TimescaleDB installed from source + +1. **Drop the TimescaleDB extension from your databases** + + Connect to each database where TimescaleDB is enabled and remove the extension: + + Linux: + ```bash + sudo -u postgres psql -d + ``` + + Windows: + ```powershell + psql -U postgres -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from shared_preload_libraries** + + Locate your PostgreSQL configuration file: + + Linux: + ```bash + psql -d postgres -c "SHOW config_file;" + ``` + + Windows: + ```powershell + psql -U postgres -d postgres -c "SHOW config_file;" + ``` + + Edit the configuration file (you may need sudo/Administrator privileges): + + Linux: + ```bash + sudo nano /path/to/postgresql.conf + ``` + + Windows: Open the configuration file in a text editor as Administrator. The default location is: + ``` + C:\Program Files\PostgreSQL\\data\postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + + Save the file. + +1. **Restart PostgreSQL** + + Linux: + ```bash + sudo service postgresql restart + ``` + + Or, depending on your system: + + ```bash + sudo systemctl restart postgresql + ``` + + macOS with Homebrew: + + ```bash + brew services restart postgresql@ + ``` + + Windows - Open Services (press `Win + R`, type `services.msc`, and press Enter). + + Find the PostgreSQL service, right-click it, and select `Restart`. + + Alternatively, from an Administrator Command Prompt or PowerShell: + + ```powershell + pg_ctl restart + ``` + +1. **Remove TimescaleDB binaries** + + Manually remove the TimescaleDB files from your PostgreSQL installation directory. + + Find your PostgreSQL library directory: + + Linux/macOS: + ```bash + pg_config --pkglibdir + ``` + + Windows: + ```powershell + pg_config --pkglibdir + ``` + + Remove TimescaleDB library files: + + Linux/macOS: + ```bash + sudo rm $(pg_config --pkglibdir)/timescaledb*.so + ``` + + Windows: + ```powershell + del "C:\Program Files\PostgreSQL\\lib\timescaledb*.dll" + ``` + + Find your PostgreSQL extension directory: + + Linux/macOS: + ```bash + pg_config --sharedir + ``` + + Windows: + ```powershell + pg_config --sharedir + ``` + + Remove TimescaleDB extension files: + + Linux/macOS: + ```bash + sudo rm -rf $(pg_config --sharedir)/extension/timescaledb* + ``` + + Windows: + ```powershell + rmdir /s "C:\Program Files\PostgreSQL\\share\extension\timescaledb*" + ``` + + You may need Administrator privileges to delete these files on Windows. + +1. **(Optional) Remove the TimescaleDB source directory** + + If you no longer need the source code: + + Linux/macOS: + ```bash + cd /path/to/parent/directory + rm -rf timescaledb + ``` + + Windows: + ```powershell + cd \path\to\parent\directory + rmdir /s timescaledb + ``` + +1. **Verify removal** + + Connect to PostgreSQL and check that the extension is not available: + + Linux/macOS: + ```bash + psql -U postgres + ``` + + Windows: + ```powershell + psql -U postgres + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. + + + +### Additional cleanup for source installations + +After uninstalling, you may want to remove any additional TimescaleDB-related files: + +**Remove TimescaleDB tools** + +If you installed `timescaledb-tune` or other tools from source, remove them: + +Linux/macOS: +```bash +# Find where timescaledb-tune is installed +which timescaledb-tune + +# Remove it +sudo rm $(which timescaledb-tune) +``` + +Windows: +```powershell +# Find where timescaledb-tune is installed +where timescaledb-tune + +# Remove it +del "path\to\timescaledb-tune.exe" +``` + +**Clean up environment variables** + +If you added TimescaleDB paths to your `PATH` environment variable during installation, remove them: + +Linux/macOS: +Edit your shell configuration file (`~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`) and remove any TimescaleDB-related PATH entries. + +Windows: +1. Search for "environment variables" in the Windows Search tool +1. Click `Edit the system environment variables` +1. Click `Environment Variables` +1. Under `System variables` or `User variables`, select `Path` and click `Edit` +1. Remove any entries related to TimescaleDB +1. Click `OK` to save + + + + \ No newline at end of file diff --git a/self-hosted/uninstall/index.md b/self-hosted/uninstall/index.md deleted file mode 100644 index 224aada757..0000000000 --- a/self-hosted/uninstall/index.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Uninstall TimescaleDB -excerpt: Uninstall TimescaleDB without uninstalling Postgres -products: [self_hosted] -keywords: [Uninstall] ---- - -# Uninstall TimescaleDB - -If you want to uninstall TimescaleDB because it does not meet your requirements, -you can uninstall it without having to uninstall $PG. - -Choose your installation method to see the appropriate uninstallation instructions: - -* [Uninstall from Docker][uninstall-docker] - Remove TimescaleDB containers, images, and volumes -* [Uninstall from Kubernetes][uninstall-kubernetes] - Remove TimescaleDB from a Kubernetes cluster -* [Uninstall from Linux][uninstall-linux] - Remove TimescaleDB from Debian, Ubuntu, Red Hat, Fedora, Rocky Linux, or ArchLinux -* [Uninstall from macOS][uninstall-macos] - Remove TimescaleDB installed with Homebrew or MacPorts -* [Uninstall from Windows][uninstall-windows] - Remove TimescaleDB from Windows systems -* [Uninstall from source][uninstall-source] - Remove TimescaleDB built and installed from source code - -[uninstall-docker]: /self-hosted/:currentVersion:/uninstall/uninstall-docker/ -[uninstall-kubernetes]: /self-hosted/:currentVersion:/uninstall/uninstall-kubernetes/ -[uninstall-linux]: /self-hosted/:currentVersion:/uninstall/uninstall-linux/ -[uninstall-macos]: /self-hosted/:currentVersion:/uninstall/uninstall-timescaledb/ -[uninstall-windows]: /self-hosted/:currentVersion:/uninstall/uninstall-windows/ -[uninstall-source]: /self-hosted/:currentVersion:/uninstall/uninstall-source/ diff --git a/self-hosted/uninstall/uninstall-docker.md b/self-hosted/uninstall/uninstall-docker.md deleted file mode 100644 index 11b88ee6be..0000000000 --- a/self-hosted/uninstall/uninstall-docker.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: Uninstall TimescaleDB from Docker -excerpt: Uninstall TimescaleDB and PostgreSQL running in a Docker container -products: [self_hosted] -keywords: [uninstall, Docker] ---- - -# Uninstall TimescaleDB from Docker - -If you installed TimescaleDB using Docker, you can completely remove the TimescaleDB container, image, and optionally the data volumes. This guide covers uninstalling both the TimescaleDB-HA and TimescaleDB light Docker images. - - - -## Uninstalling TimescaleDB from Docker - -1. **Stop the running container** - - ```bash - docker stop timescaledb - ``` - - If you named your container differently when you created it, replace `timescaledb` with your container name. You can list all running containers with: - - ```bash - docker ps - ``` - -1. **Remove the container** - - ```bash - docker rm timescaledb - ``` - - This removes the container but preserves the data volume and the Docker image. - -1. **List and remove the Docker image** - - To see which TimescaleDB images you have installed: - - ```bash - docker images | grep timescale - ``` - - Remove the specific TimescaleDB image: - - ```bash - # For TimescaleDB-HA - docker rmi timescale/timescaledb-ha:pg17 - - # For TimescaleDB light - docker rmi timescale/timescaledb:latest-pg17 - ``` - - Replace `pg17` with your PostgreSQL version if different. - -1. **(Optional) Remove the data volume** - - - - This step permanently deletes all your database data. Only proceed if you're sure you no longer need this data or have backed it up. - - - - List all Docker volumes: - - ```bash - docker volume ls - ``` - - If you used a named volume when creating your container, remove it: - - ```bash - docker volume rm - ``` - - If you used a host directory mount (with the `-v :/pgdata` flag), you can manually delete that directory: - - ```bash - rm -rf - ``` - -1. **Verify removal** - - Confirm that the container, image, and volumes have been removed: - - ```bash - # Check for containers - docker ps -a | grep timescaledb - - # Check for images - docker images | grep timescale - - # Check for volumes - docker volume ls - ``` - - - -## Remove all unused Docker resources - -If you want to clean up all unused Docker resources (not just TimescaleDB), you can use: - -```bash -# Remove all stopped containers -docker container prune - -# Remove all unused images -docker image prune -a - -# Remove all unused volumes -docker volume prune - -# Remove all unused resources (containers, images, volumes, networks) -docker system prune -a --volumes -``` - - - -These commands will remove all unused Docker resources, not just TimescaleDB. Use with caution if you have other Docker containers or images you want to keep. - - diff --git a/self-hosted/uninstall/uninstall-kubernetes.md b/self-hosted/uninstall/uninstall-kubernetes.md deleted file mode 100644 index 92e18a1144..0000000000 --- a/self-hosted/uninstall/uninstall-kubernetes.md +++ /dev/null @@ -1,193 +0,0 @@ ---- -title: Uninstall TimescaleDB from Kubernetes -excerpt: Remove TimescaleDB resources from a Kubernetes cluster -products: [self_hosted] -keywords: [uninstall, Kubernetes] ---- - -# Uninstall TimescaleDB from Kubernetes - -If you deployed TimescaleDB on Kubernetes, you can completely remove all associated resources including the StatefulSet, Service, PersistentVolumeClaim, Secret, and application deployments. This guide shows you how to cleanly uninstall TimescaleDB from your Kubernetes cluster. - - - -## Uninstalling TimescaleDB from Kubernetes - -1. **Back up your data (optional but recommended)** - - Before uninstalling, back up any important data from your TimescaleDB instance: - - ```shell - kubectl exec -it timescaledb-0 -- pg_dump -U postgres postgres > backup.sql - ``` - - - - Deleting the PersistentVolumeClaim will permanently delete all your database data. Ensure you have backed up any data you need before proceeding. - - - -1. **Delete the test pod (if it exists)** - - If you created a test pod during installation: - - ```shell - kubectl delete pod test-pod - ``` - -1. **Delete the application deployment** - - Remove any application deployments that connect to TimescaleDB: - - ```shell - kubectl delete deployment timescale-app - ``` - -1. **Delete the TimescaleDB service** - - Remove the service that exposes TimescaleDB within the cluster: - - ```shell - kubectl delete service timescaledb - ``` - -1. **Delete the TimescaleDB StatefulSet** - - Remove the StatefulSet managing the TimescaleDB pods: - - ```shell - kubectl delete statefulset timescaledb - ``` - - This will terminate the TimescaleDB pod(s). - -1. **Delete the PersistentVolumeClaim** - - - - This step permanently deletes all database data stored in the persistent volume. - - - - ```shell - kubectl delete pvc timescale-pvc - ``` - -1. **Delete the secret** - - Remove the Kubernetes secret containing database credentials: - - ```shell - kubectl delete secret timescale-secret - ``` - -1. **(Optional) Delete the namespace** - - If you created a dedicated namespace for TimescaleDB and want to remove it: - - ```shell - kubectl delete namespace timescale - ``` - - - - Only delete the namespace if you're certain no other resources are using it. This will delete all resources in the namespace. - - - -1. **Verify removal** - - Confirm that all TimescaleDB resources have been deleted: - - ```shell - # Check for StatefulSets - kubectl get statefulsets - - # Check for Services - kubectl get services - - # Check for PVCs - kubectl get pvc - - # Check for Secrets - kubectl get secrets - - # Check for Pods - kubectl get pods - ``` - - TimescaleDB-related resources should not appear in these lists. - - - -## Uninstalling TimescaleDB installed with Kubernetes operators - -If you installed TimescaleDB using a Kubernetes operator (StackGres, Patroni, PGO, or CloudNativePG), follow the operator-specific uninstallation instructions: - -### StackGres - -```shell -kubectl delete sgcluster -kubectl delete sgpgconfig -``` - -For complete uninstallation: - -```shell -helm uninstall stackgres-operator --namespace stackgres -kubectl delete namespace stackgres -``` - -### PostgreSQL Operator (Patroni/Zalando) - -```shell -kubectl delete postgresql -``` - -To uninstall the operator: - -```shell -kubectl delete -f https://raw.githubusercontent.com/zalando/postgres-operator/master/manifests/postgresql-operator.yaml -``` - -### PGO (Crunchy Data) - -```shell -kubectl delete postgrescluster -``` - -To uninstall the operator: - -```shell -kubectl delete -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/master/installers/kubectl/postgres-operator.yml -``` - -### CloudNativePG - -```shell -kubectl delete cluster -``` - -To uninstall the operator: - -```shell -kubectl delete -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.23/releases/cnpg-1.23.0.yaml -``` - -## Clean up persistent volumes - -After deleting the PersistentVolumeClaim, you may also want to delete the associated PersistentVolume if it was manually provisioned: - -```shell -# List persistent volumes -kubectl get pv - -# Delete a specific persistent volume -kubectl delete pv -``` - - - -If you're using dynamic provisioning with a storage class, the PersistentVolume should be automatically deleted when you delete the PersistentVolumeClaim, depending on your reclaim policy. - - diff --git a/self-hosted/uninstall/uninstall-linux.md b/self-hosted/uninstall/uninstall-linux.md deleted file mode 100644 index c783414718..0000000000 --- a/self-hosted/uninstall/uninstall-linux.md +++ /dev/null @@ -1,449 +0,0 @@ ---- -title: Uninstall TimescaleDB on Linux -excerpt: Uninstall TimescaleDB from Debian, Ubuntu, Red Hat, Fedora, Rocky Linux, or ArchLinux -products: [self_hosted] -keywords: [uninstall, Linux, Debian, Ubuntu, RHEL, Fedora] ---- - -# Uninstall TimescaleDB on Linux - -If you installed TimescaleDB on Linux using a package manager, you can uninstall it without removing PostgreSQL. This guide covers uninstalling TimescaleDB from Debian-based systems (Debian, Ubuntu) and Red Hat-based systems (RHEL, Fedora, Rocky Linux), as well as ArchLinux. - - - - - - - -1. **Drop the TimescaleDB extension from your databases** - - Connect to each database where TimescaleDB is enabled and remove the extension: - - ```bash - sudo -u postgres psql -d - ``` - - At the `psql` prompt: - - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from `shared_preload_libraries`** - - Edit the $PG configuration file: - - ```bash - sudo nano /etc/postgresql/17/main/postgresql.conf - ``` - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - -1. **Restart $PG** - - ```bash - sudo systemctl restart postgresql - ``` - -1. **Uninstall the TimescaleDB package** - - ```bash - sudo apt remove timescaledb-2-postgresql-17 - ``` - - Replace `17` with your PostgreSQL version if different. - -1. **Remove the TimescaleDB repository configuration** - - ```bash - sudo rm /etc/apt/sources.list.d/timescaledb.list - sudo rm /etc/apt/trusted.gpg.d/timescaledb.gpg - ``` - -1. **Update the package list** - - ```bash - sudo apt update - ``` - -1. **(Optional) Remove TimescaleDB dependencies** - - If you want to remove packages that were installed as dependencies: - - ```bash - sudo apt autoremove - ``` - - - - - - - - - -1. **Drop the TimescaleDB extension from your databases** - - Connect to each database where TimescaleDB is enabled and remove the extension: - - ```bash - sudo -u postgres psql -d - ``` - - At the `psql` prompt: - - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from `shared_preload_libraries`** - - Edit the PostgreSQL configuration file: - - ```bash - sudo nano /etc/postgresql/17/main/postgresql.conf - ``` - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - -1. **Restart PostgreSQL** - - ```bash - sudo systemctl restart postgresql - ``` - -1. **Uninstall the TimescaleDB package** - - ```bash - sudo apt remove timescaledb-2-postgresql-17 - ``` - - Replace `17` with your PostgreSQL version if different. - -1. **Remove the TimescaleDB repository configuration** - - ```bash - sudo rm /etc/apt/sources.list.d/timescaledb.list - sudo rm /etc/apt/trusted.gpg.d/timescaledb.gpg - ``` - - For Ubuntu 21.10 and earlier, also remove the old GPG key: - - ```bash - sudo apt-key del timescaledb 2>/dev/null || true - ``` - -1. **Update the package list** - - ```bash - sudo apt update - ``` - -1. **(Optional) Remove TimescaleDB dependencies** - - If you want to remove packages that were installed as dependencies: - - ```bash - sudo apt autoremove - ``` - - - - - - - - - -## Uninstalling TimescaleDB from Red Hat - -1. **Drop the TimescaleDB extension from your databases** - - Connect to each database where TimescaleDB is enabled and remove the extension: - - ```bash - sudo -u postgres psql -d - ``` - - At the `psql` prompt: - - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from shared_preload_libraries** - - Edit the PostgreSQL configuration file: - - ```bash - sudo vi /var/lib/pgsql/17/data/postgresql.conf - ``` - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - -1. **Restart PostgreSQL** - - ```bash - sudo systemctl restart postgresql-17 - ``` - - Replace `17` with your PostgreSQL version if different. - -1. **Uninstall the TimescaleDB package** - - ```bash - sudo yum remove timescaledb-2-postgresql-17 - ``` - - Replace `17` with your PostgreSQL version if different. - - - - On some Red Hat systems, this command may try to remove `postgresql17-server` as an unused dependency. If you see PostgreSQL server in the removal list, type `N` to cancel. TimescaleDB is already functionally uninstalled (extension dropped and configuration removed), so leaving the packages installed is safe. - - - -1. **Remove the TimescaleDB repository configuration** - - ```bash - sudo rm /etc/yum.repos.d/timescale_timescaledb.repo - ``` - -1. **Clean the YUM cache** - - ```bash - sudo yum clean all - ``` - - - - - - - - - -1. **Drop the TimescaleDB extension from your databases** - - Connect to each database where TimescaleDB is enabled and remove the extension: - - ```bash - sudo -u postgres psql -d - ``` - - At the `psql` prompt: - - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from `shared_preload_libraries`** - - Edit the PostgreSQL configuration file: - - ```bash - sudo vi /var/lib/pgsql/17/data/postgresql.conf - ``` - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - -1. **Restart PostgreSQL** - - ```bash - sudo systemctl restart postgresql-17 - ``` - - Replace `17` with your PostgreSQL version if different. - -1. **Uninstall the TimescaleDB package** - - ```bash - sudo dnf remove timescaledb-2-postgresql-17 - ``` - - Replace `17` with your PostgreSQL version if different. - - - - On some Fedora systems, this command may try to remove `postgresql17-server` as an unused dependency. If you see PostgreSQL server in the removal list, type `N` to cancel. TimescaleDB is already functionally uninstalled (extension dropped and configuration removed), so leaving the packages installed is safe. - - - -1. **Remove the TimescaleDB repository configuration** - - ```bash - sudo rm /etc/yum.repos.d/timescale_timescaledb.repo - ``` - -1. **Clean the DNF cache** - - ```bash - sudo dnf clean all - ``` - - - - - - - - - -1. **Drop the TimescaleDB extension from your databases** - - Connect to each database where TimescaleDB is enabled and remove the extension: - - ```bash - sudo -u postgres psql -d - ``` - - At the `psql` prompt: - - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from `shared_preload_libraries`** - - Edit the PostgreSQL configuration file: - - ```bash - sudo vi /var/lib/pgsql/17/data/postgresql.conf - ``` - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - -1. **Restart PostgreSQL** - - ```bash - sudo systemctl restart postgresql-17 - ``` - - Replace `17` with your PostgreSQL version if different. - -1. **Uninstall the TimescaleDB package** - - ```bash - sudo yum remove timescaledb-2-postgresql-17 - ``` - - Replace `17` with your PostgreSQL version if different. - -1. **Remove the TimescaleDB repository configuration** - - ```bash - sudo rm /etc/yum.repos.d/timescale_timescaledb.repo - ``` - -1. **Clean the YUM cache** - - ```bash - sudo yum clean all - ``` - - - - - - - diff --git a/self-hosted/uninstall/uninstall-source.md b/self-hosted/uninstall/uninstall-source.md deleted file mode 100644 index 8c9271fba8..0000000000 --- a/self-hosted/uninstall/uninstall-source.md +++ /dev/null @@ -1,351 +0,0 @@ ---- -title: Uninstall TimescaleDB installed from source -excerpt: Uninstall TimescaleDB that was built and installed from source code -products: [self_hosted] -keywords: [uninstall, source] ---- - -# Uninstall TimescaleDB installed from source - -If you installed TimescaleDB by building from source, you can uninstall it without removing PostgreSQL. This guide shows you how to remove TimescaleDB that was compiled and installed from the source code. - - - - - - - -## Uninstalling TimescaleDB on Linux - -1. **Drop the TimescaleDB extension from your databases** - - Connect to each database where TimescaleDB is enabled and remove the extension: - - ```bash - sudo -u postgres psql -d - ``` - - At the `psql` prompt: - - ```sql - DROP EXTENSION IF EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from shared_preload_libraries** - - Locate your PostgreSQL configuration file: - - ```bash - psql -d postgres -c "SHOW config_file;" - ``` - - Edit the configuration file (you may need sudo privileges): - - ```bash - sudo nano /path/to/postgresql.conf - ``` - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - - Save the file. - -1. **Restart PostgreSQL** - - ```bash - sudo service postgresql restart - ``` - - Or, depending on your system: - - ```bash - sudo systemctl restart postgresql - ``` - -1. **Uninstall the TimescaleDB binaries** - - Navigate to your TimescaleDB build directory: - - ```bash - cd /path/to/timescaledb/build - ``` - - Uninstall the files: - - ```bash - sudo make uninstall - ``` - - - - If you no longer have the build directory, you'll need to manually remove the TimescaleDB files from your PostgreSQL installation directory. - - - -1. **Manually remove TimescaleDB files (if make uninstall fails)** - - If the `make uninstall` command doesn't work, manually remove the files: - - Find your PostgreSQL library directory: - - ```bash - pg_config --pkglibdir - ``` - - Remove TimescaleDB library files: - - ```bash - sudo rm $(pg_config --pkglibdir)/timescaledb*.so - ``` - - Find your PostgreSQL extension directory: - - ```bash - pg_config --sharedir - ``` - - Remove TimescaleDB extension files: - - ```bash - sudo rm -rf $(pg_config --sharedir)/extension/timescaledb* - ``` - -1. **(Optional) Remove the TimescaleDB source directory** - - If you no longer need the source code: - - ```bash - cd /path/to/parent/directory - rm -rf timescaledb - ``` - -1. **Verify removal** - - Connect to PostgreSQL and check that the extension is not available: - - ```bash - psql -U postgres - ``` - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. - - - - - - - - - -## Uninstalling TimescaleDB on Windows - -1. **Drop the TimescaleDB extension from your databases** - - Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: - - ```powershell - psql -U postgres -d - ``` - - At the `psql` prompt: - - ```sql - DROP EXTENSION IF EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from shared_preload_libraries** - - Locate your PostgreSQL configuration file: - - ```powershell - psql -U postgres -d postgres -c "SHOW config_file;" - ``` - - Open the configuration file in a text editor (you may need Administrator privileges). The default location is: - - ``` - C:\Program Files\PostgreSQL\\data\postgresql.conf - ``` - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - - Save the file. - -1. **Restart PostgreSQL** - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - - Find the PostgreSQL service, right-click it, and select `Restart`. - - Alternatively, from an Administrator Command Prompt or PowerShell: - - ```powershell - pg_ctl restart - ``` - -1. **Uninstall the TimescaleDB binaries** - - Navigate to your TimescaleDB build directory: - - ```powershell - cd \path\to\timescaledb\build - ``` - - Uninstall the files: - - ```powershell - cmake --build . --config Release --target uninstall - ``` - - - - If you no longer have the build directory, you'll need to manually remove the TimescaleDB files from your PostgreSQL installation directory. - - - -1. **Manually remove TimescaleDB files (if cmake uninstall fails)** - - If the cmake uninstall command doesn't work, manually remove the files. - - Find your PostgreSQL library directory: - - ```powershell - pg_config --pkglibdir - ``` - - Remove TimescaleDB DLL files: - - ```powershell - del "C:\Program Files\PostgreSQL\\lib\timescaledb*.dll" - ``` - - Find your PostgreSQL extension directory: - - ```powershell - pg_config --sharedir - ``` - - Remove TimescaleDB extension files: - - ```powershell - rmdir /s "C:\Program Files\PostgreSQL\\share\extension\timescaledb*" - ``` - - You may need Administrator privileges to delete these files. - -1. **(Optional) Remove the TimescaleDB source directory** - - If you no longer need the source code: - - ```powershell - cd \path\to\parent\directory - rmdir /s timescaledb - ``` - -1. **Verify removal** - - Connect to PostgreSQL and check that the extension is not available: - - ```powershell - psql -U postgres - ``` - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. - - - - - - - -## Additional cleanup - -After uninstalling, you may want to remove any additional TimescaleDB-related files: - -### Remove TimescaleDB tools - -If you installed `timescaledb-tune` or other tools from source, remove them: - -**Linux:** -```bash -# Find where timescaledb-tune is installed -which timescaledb-tune - -# Remove it -sudo rm $(which timescaledb-tune) -``` - -**Windows:** -```powershell -# Find where timescaledb-tune is installed -where timescaledb-tune - -# Remove it -del "path\to\timescaledb-tune.exe" -``` - -### Clean up environment variables - -If you added TimescaleDB paths to your `PATH` environment variable during installation, remove them: - -**Linux:** -Edit your shell configuration file (`~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`) and remove any TimescaleDB-related PATH entries. - -**Windows:** -1. Search for "environment variables" in the Windows Search tool -1. Click `Edit the system environment variables` -1. Click `Environment Variables` -1. Under `System variables` or `User variables`, select `Path` and click `Edit` -1. Remove any entries related to TimescaleDB -1. Click `OK` to save diff --git a/self-hosted/uninstall/uninstall-timescaledb.md b/self-hosted/uninstall/uninstall-timescaledb.md deleted file mode 100644 index 95a62b7af3..0000000000 --- a/self-hosted/uninstall/uninstall-timescaledb.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: Uninstall TimescaleDB -excerpt: Uninstall TimescaleDB installed with Homebrew or MacPorts without having to uninstall Postgres -products: [self_hosted] -keywords: [uninstall] ---- - -# Uninstall TimescaleDB - -$PG is designed to be easily extensible. The extensions loaded into the -database can function just like features that are built in. TimescaleDB extends -$PG for time-series data, giving $PG the high-performance, -scalability, and analytical capabilities required by modern data-intensive -applications. If you installed TimescaleDB with Homebrew or MacPorts, you can -uninstall it without having to uninstall $PG. - - - -## Uninstalling TimescaleDB using Homebrew - -1. At the `psql` prompt, remove the TimescaleDB extension: - - ```sql - DROP EXTENSION timescaledb; - ``` - -1. At the command prompt, remove `timescaledb` from `shared_preload_libraries` - in the `postgresql.conf` configuration file: - - ```bash - nano /opt/homebrew/var/postgresql@14/postgresql.conf - shared_preload_libraries = '' - ``` - -1. Save the changes to the `postgresql.conf` file. - -1. Restart $PG: - - ```bash - brew services restart postgresql - ``` - -1. Check that the TimescaleDB extension is uninstalled by using the `\dx` - command at the `psql` prompt. Output is similar to: - - ```sql - tsdb-# \dx - List of installed extensions - Name | Version | Schema | Description - -------------+---------+------------+------------------------------------------------------------------- - plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - (1 row) - ``` - -1. Uninstall TimescaleDB: - - ```bash - brew uninstall timescaledb - ``` - -1. Remove all the dependencies and related files: - - ```bash - brew remove timescaledb - ``` - - - - - -## Uninstalling TimescaleDB using MacPorts - -1. At the `psql` prompt, remove the TimescaleDB extension: - - ```sql - DROP EXTENSION timescaledb; - ``` - -1. At the command prompt, remove `timescaledb` from `shared_preload_libraries` - in the `postgresql.conf` configuration file: - - ```bash - nano /opt/homebrew/var/postgresql@14/postgresql.conf - shared_preload_libraries = '' - ``` - -1. Save the changes to the `postgresql.conf` file. - -1. Restart $PG: - - ```bash - port reload postgresql - ``` - -1. Check that the TimescaleDB extension is uninstalled by using the `\dx` - command at the `psql` prompt. Output is similar to: - - ```sql - tsdb-# \dx - List of installed extensions - Name | Version | Schema | Description - -------------+---------+------------+------------------------------------------------------------------- - plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - (1 row) - ``` - -1. Uninstall TimescaleDB and the related dependencies: - - ```bash - port uninstall timescaledb --follow-dependencies - ``` - - diff --git a/self-hosted/uninstall/uninstall-windows.md b/self-hosted/uninstall/uninstall-windows.md deleted file mode 100644 index 9d851164fb..0000000000 --- a/self-hosted/uninstall/uninstall-windows.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Uninstall TimescaleDB on Windows -excerpt: Uninstall TimescaleDB from Windows without removing PostgreSQL -products: [self_hosted] -keywords: [uninstall, Windows] ---- - -# Uninstall TimescaleDB on Windows - -If you installed TimescaleDB on Windows, you can uninstall it without removing PostgreSQL. This guide shows you how to completely remove TimescaleDB from your Windows system. - - - -## Uninstalling TimescaleDB from Windows - -1. **Drop the TimescaleDB extension from your databases** - - Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: - - ```bash - psql -U postgres -d - ``` - - At the `psql` prompt, remove the extension: - - ```sql - DROP EXTENSION IF EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from shared_preload_libraries** - - Locate your PostgreSQL configuration file. The default location is: - - ``` - C:\Program Files\PostgreSQL\\data\postgresql.conf - ``` - - Open the file in a text editor (you may need to run the editor as Administrator). - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - - Save the file. - -1. **Restart the PostgreSQL service** - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - - Find the PostgreSQL service (usually named `postgresql-x64-`), right-click it, and select `Restart`. - - Alternatively, from an Administrator Command Prompt or PowerShell: - - ```powershell - net stop postgresql-x64- - net start postgresql-x64- - ``` - - Replace `` with your PostgreSQL version number (for example, `17`). - -1. **Remove TimescaleDB files** - - Open PowerShell as Administrator and manually delete the TimescaleDB library and extension files: - - ```powershell - Remove-Item "C:\Program Files\PostgreSQL\\lib\timescaledb*" - Remove-Item "C:\Program Files\PostgreSQL\\share\extension\timescaledb*" - ``` - - Replace `` with your PostgreSQL version number (for example, `17`). - - - - From 44af7e390f0591fe92d23df8adba49b6718d88af Mon Sep 17 00:00:00 2001 From: atovpeko Date: Tue, 2 Dec 2025 15:35:36 +0200 Subject: [PATCH 04/15] draft --- self-hosted/tooling/install-toolkit.md | 161 ++++++++++++++++++--- self-hosted/uninstall.md | 192 ++++++++++++------------- 2 files changed, 238 insertions(+), 115 deletions(-) diff --git a/self-hosted/tooling/install-toolkit.md b/self-hosted/tooling/install-toolkit.md index d43dbea136..7271deabf2 100644 --- a/self-hosted/tooling/install-toolkit.md +++ b/self-hosted/tooling/install-toolkit.md @@ -1,12 +1,22 @@ --- -title: Install and update TimescaleDB Toolkit -excerpt: Install the TimescaleDB Toolkit extension to access more hyperfunctions and function pipelines +title: Install, update, and uninstall TimescaleDB Toolkit +excerpt: Install, update, and uninstall the TimescaleDB Toolkit extension to access more hyperfunctions and function pipelines products: [self_hosted] -keywords: [Toolkit, installation, hyperfunctions, function pipelines] +keywords: [Toolkit, installation, uninstallation, hyperfunctions, function pipelines] --- import ToolkitDebianBase from "versionContent/_partials/_toolkit-install-update-debian-base.mdx"; import ToolkitRedhatBase from "versionContent/_partials/_toolkit-install-update-redhat-base.mdx"; +import ToolkitRockyBase from "versionContent/_partials/_toolkit-install-update-rocky-base.mdx"; +import ToolkitWindowsBase from "versionContent/_partials/_toolkit-install-update-windows-base.mdx"; +import ToolkitKubernetesBase from "versionContent/_partials/_toolkit-install-update-kubernetes-base.mdx"; +import ToolkitSourceBase from "versionContent/_partials/_toolkit-install-update-source-base.mdx"; +import ToolkitDebianUninstall from "versionContent/_partials/_toolkit-uninstall-debian-base.mdx"; +import ToolkitRedhatUninstall from "versionContent/_partials/_toolkit-uninstall-redhat-base.mdx"; +import ToolkitRockyUninstall from "versionContent/_partials/_toolkit-uninstall-rocky-base.mdx"; +import ToolkitWindowsUninstall from "versionContent/_partials/_toolkit-uninstall-windows-base.mdx"; +import ToolkitKubernetesUninstall from "versionContent/_partials/_toolkit-uninstall-kubernetes-base.mdx"; +import ToolkitSourceUninstall from "versionContent/_partials/_toolkit-uninstall-source-base.mdx"; # Install and update $TIMESCALE_DB Toolkit @@ -23,48 +33,108 @@ If you're using [$CLOUD_LONG][cloud], the $TOOLKIT_LONG is already installed. If + + +## Install $TOOLKIT_LONG + +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 +``` + +For more information on running $TIMESCALE_DB using Docker, see +[Install TimescaleDB from a Docker container][docker-install]. + +## Update $TOOLKIT_LONG + +To get the latest version of $TOOLKIT_SHORT, [update][update-docker] the $TIMESCALE_DB HA docker image. + +## Uninstall $TOOLKIT_LONG + +$TOOLKIT_SHORT is included in the TimescaleDB HA Docker image and cannot be uninstalled separately. To remove $TOOLKIT_SHORT, you need to remove the entire TimescaleDB container. See [Uninstall TimescaleDB from Docker][uninstall-docker]. + +If you only want to remove the extension from a specific database without removing the container: + + + +1. Connect to your database: + + ```bash + docker exec -it timescaledb psql -U postgres -d + ``` + +1. Drop the $TOOLKIT_SHORT extension: + + ```sql + DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + ``` + + + + Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + + + + + + + + + + + + + + + + + + + + + + + + + - - - + -## Install $TOOLKIT_LONG + -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 -``` + -For more information on running $TIMESCALE_DB using Docker, see -[Install TimescaleDB from a Docker container][docker-install]. + -## Update $TOOLKIT_LONG + -To get the latest version of $TOOLKIT_SHORT, [update][update-docker] the $TIMESCALE_DB HA docker image. + @@ -144,7 +214,59 @@ Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENS - + +## Uninstall $TOOLKIT_LONG + +If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TIMESCALE_DB or $PG. + + + +1. **Drop the $TOOLKIT_SHORT extension from your databases** + + Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: + + ```bash + psql -d "postgres://:@:/" + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + ``` + + Repeat this for all databases with $TOOLKIT_SHORT enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + + + +1. **Uninstall the $TOOLKIT_SHORT package** + + ```bash + brew uninstall timescaledb-toolkit + ``` + + + + + + + + + + + + + + + + + + + @@ -158,4 +280,5 @@ Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENS [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 +[macos-install]: /self-hosted/:currentVersion:/install/installation-macos/ +[uninstall-docker]: /self-hosted/:currentVersion:/uninstall/ \ No newline at end of file diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index dead695542..4bd8d98b5c 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -825,102 +825,6 @@ If you're using dynamic provisioning with a storage class, the PersistentVolume - - -If you installed TimescaleDB on Windows using a package manager, you can uninstall it without removing PostgreSQL. - - - -## Uninstalling TimescaleDB from Windows - -1. **Drop the TimescaleDB extension from your databases** - - Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: - - ```bash - psql -U postgres -d - ``` - - At the `psql` prompt, remove the extension: - - ```sql - DROP EXTENSION IF EXISTS timescaledb CASCADE; - ``` - - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove TimescaleDB from shared_preload_libraries** - - Locate your PostgreSQL configuration file. The default location is: - - ``` - C:\Program Files\PostgreSQL\\data\postgresql.conf - ``` - - Open the file in a text editor (you may need to run the editor as Administrator). - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - - Save the file. - -1. **Restart PostgreSQL** - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - - Find the PostgreSQL service, right-click it, and select `Restart`. - - Alternatively, from an Administrator Command Prompt or PowerShell: - - ```powershell - pg_ctl restart - ``` - -1. **Uninstall TimescaleDB** - - Open Control Panel and navigate to "Programs and Features" or "Add or Remove Programs". - - Find "TimescaleDB" in the list of installed programs, select it, and click "Uninstall". - - Follow the uninstaller prompts to complete the removal. - -1. **Verify removal** - - Connect to PostgreSQL and check that the extension is not available: - - ```powershell - psql -U postgres - ``` - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. - - - - - @@ -1287,4 +1191,100 @@ Windows: + + +If you installed TimescaleDB on Windows using a package manager, you can uninstall it without removing PostgreSQL. + + + +## Uninstalling TimescaleDB from Windows + +1. **Drop the TimescaleDB extension from your databases** + + Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: + + ```bash + psql -U postgres -d + ``` + + At the `psql` prompt, remove the extension: + + ```sql + DROP EXTENSION IF EXISTS timescaledb CASCADE; + ``` + + Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + + + +1. **Remove TimescaleDB from shared_preload_libraries** + + Locate your PostgreSQL configuration file. The default location is: + + ``` + C:\Program Files\PostgreSQL\\data\postgresql.conf + ``` + + Open the file in a text editor (you may need to run the editor as Administrator). + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` + shared_preload_libraries = '' + ``` + + If there are other extensions in the list, keep them and only remove `timescaledb`. + + Save the file. + +1. **Restart PostgreSQL** + + Open Services (press `Win + R`, type `services.msc`, and press Enter). + + Find the PostgreSQL service, right-click it, and select `Restart`. + + Alternatively, from an Administrator Command Prompt or PowerShell: + + ```powershell + pg_ctl restart + ``` + +1. **Uninstall TimescaleDB** + + Open Control Panel and navigate to "Programs and Features" or "Add or Remove Programs". + + Find "TimescaleDB" in the list of installed programs, select it, and click "Uninstall". + + Follow the uninstaller prompts to complete the removal. + +1. **Verify removal** + + Connect to PostgreSQL and check that the extension is not available: + + ```powershell + psql -U postgres + ``` + + Try to create the extension: + + ```sql + CREATE EXTENSION timescaledb; + ``` + + You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. + + + + + \ No newline at end of file From 4fbabba12b3079fc009e0dbee831e3f8eb127827 Mon Sep 17 00:00:00 2001 From: atovpeko Date: Tue, 2 Dec 2025 22:48:32 +0200 Subject: [PATCH 05/15] draft --- .../_toolkit-install-update-debian-base.mdx | 78 +++++++++++++ ...toolkit-install-update-kubernetes-base.mdx | 61 ++++++++++ .../_toolkit-install-update-redhat-base.md | 1 - .../_toolkit-install-update-redhat-base.mdx | 86 ++++++++++++++ .../_toolkit-install-update-rocky-base.mdx | 86 ++++++++++++++ .../_toolkit-install-update-source-base.mdx | 88 +++++++++++++++ .../_toolkit-install-update-windows-base.mdx | 76 +++++++++++++ _partials/_toolkit-uninstall-debian-base.mdx | 48 ++++++++ .../_toolkit-uninstall-kubernetes-base.mdx | 33 ++++++ _partials/_toolkit-uninstall-redhat-base.mdx | 48 ++++++++ _partials/_toolkit-uninstall-rocky-base.mdx | 48 ++++++++ _partials/_toolkit-uninstall-source-base.mdx | 106 ++++++++++++++++++ _partials/_toolkit-uninstall-windows-base.mdx | 47 ++++++++ 13 files changed, 805 insertions(+), 1 deletion(-) create mode 100644 _partials/_toolkit-install-update-debian-base.mdx create mode 100644 _partials/_toolkit-install-update-kubernetes-base.mdx create mode 100644 _partials/_toolkit-install-update-redhat-base.mdx create mode 100644 _partials/_toolkit-install-update-rocky-base.mdx create mode 100644 _partials/_toolkit-install-update-source-base.mdx create mode 100644 _partials/_toolkit-install-update-windows-base.mdx create mode 100644 _partials/_toolkit-uninstall-debian-base.mdx create mode 100644 _partials/_toolkit-uninstall-kubernetes-base.mdx create mode 100644 _partials/_toolkit-uninstall-redhat-base.mdx create mode 100644 _partials/_toolkit-uninstall-rocky-base.mdx create mode 100644 _partials/_toolkit-uninstall-source-base.mdx create mode 100644 _partials/_toolkit-uninstall-windows-base.mdx diff --git a/_partials/_toolkit-install-update-debian-base.mdx b/_partials/_toolkit-install-update-debian-base.mdx new file mode 100644 index 0000000000..ebdaa0e561 --- /dev/null +++ b/_partials/_toolkit-install-update-debian-base.mdx @@ -0,0 +1,78 @@ +## Prerequisites + +To follow this procedure: + +- [Install $TIMESCALE_DB][debian-install]. +- Add the $TIMESCALE_DB repository and the GPG key. + +## Install $TOOLKIT_LONG + +These instructions use the `apt` package manager. + + + +1. Update your local repository list: + + ```bash + sudo apt update + ``` + +1. Install TimescaleDB Toolkit: + + ```bash + sudo apt install timescaledb-toolkit-postgresql-17 + ``` + +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 + apt update + ``` + +1. Install the latest version of $TOOLKIT_LONG: + + ```bash + apt 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: + + ```sql + ALTER EXTENSION timescaledb_toolkit UPDATE; + ``` + + + + For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active + sessions. + + + + + +[brew-install]: https://brew.sh +[cloud]: /use-timescale/:currentVersion:/services/ +[debian-install]: /self-hosted/:currentVersion:/install/installation-linux/ +[docker-install]: /self-hosted/:currentVersion:/install/installation-docker/ +[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 diff --git a/_partials/_toolkit-install-update-kubernetes-base.mdx b/_partials/_toolkit-install-update-kubernetes-base.mdx new file mode 100644 index 0000000000..22d1b95df9 --- /dev/null +++ b/_partials/_toolkit-install-update-kubernetes-base.mdx @@ -0,0 +1,61 @@ +## Prerequisites + +To follow this procedure: + +- [Install $TIMESCALE_DB on Kubernetes][kubernetes-install]. + +## Install $TOOLKIT_LONG + +$TOOLKIT_SHORT is included in the TimescaleDB HA Docker image and is already available in your Kubernetes deployment. + +To use $TOOLKIT_SHORT: + + + +1. Connect to your TimescaleDB pod: + + ```shell + kubectl exec -it -- psql -U postgres -d + ``` + + Replace `` with your TimescaleDB pod name (for example, `timescaledb-0`). + +1. Create the $TOOLKIT_SHORT extension in the database: + + ```sql + CREATE EXTENSION timescaledb_toolkit; + ``` + + + +## Update $TOOLKIT_LONG + +To get the latest version of $TOOLKIT_SHORT, [update the TimescaleDB HA Docker image][kubernetes-install] used by your Kubernetes deployment. + +After updating the image: + + + +1. Connect to your TimescaleDB pod: + + ```shell + kubectl exec -it -- psql -U postgres -d + ``` + +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. + + + + + +[kubernetes-install]: /self-hosted/:currentVersion:/install/installation-kubernetes/ +[connect]: /integrations/:currentVersion:/find-connection-details/ diff --git a/_partials/_toolkit-install-update-redhat-base.md b/_partials/_toolkit-install-update-redhat-base.md index 9224fbb685..7c938c4b81 100644 --- a/_partials/_toolkit-install-update-redhat-base.md +++ b/_partials/_toolkit-install-update-redhat-base.md @@ -1,4 +1,3 @@ - ## Prerequisites To follow this procedure: diff --git a/_partials/_toolkit-install-update-redhat-base.mdx b/_partials/_toolkit-install-update-redhat-base.mdx new file mode 100644 index 0000000000..9224fbb685 --- /dev/null +++ b/_partials/_toolkit-install-update-redhat-base.mdx @@ -0,0 +1,86 @@ + +## Prerequisites + +To follow this procedure: + +- [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 + curl -s https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | sudo bash + ``` + +1. Update your local repository list: + + ```bash + yum update + ``` + +1. Install $TOOLKIT_LONG: + + ```bash + yum install timescaledb-toolkit-postgresql-17 + ``` + +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 + yum update + ``` + +1. Install the latest version of $TOOLKIT_LONG: + + ```bash + 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: + + ```sql + ALTER EXTENSION timescaledb_toolkit UPDATE; + ``` + + + + For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active + sessions. + + + + + + +[brew-install]: https://brew.sh +[cloud]: /use-timescale/:currentVersion:/services/ +[debian-install]: /self-hosted/:currentVersion:/install/installation-linux/ +[docker-install]: /self-hosted/:currentVersion:/install/installation-docker/ +[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 diff --git a/_partials/_toolkit-install-update-rocky-base.mdx b/_partials/_toolkit-install-update-rocky-base.mdx new file mode 100644 index 0000000000..a6d441f0be --- /dev/null +++ b/_partials/_toolkit-install-update-rocky-base.mdx @@ -0,0 +1,86 @@ + +## Prerequisites + +To follow this procedure: + +- [Install $TIMESCALE_DB][rocky-install]. +- Create a $TIMESCALE_DB repository in your `dnf` `repo.d` directory. + +## Install $TOOLKIT_LONG + +These instructions use the `dnf` package manager. + + + +1. Set up the repository: + + ```bash + curl -s https://packagecloud.io/install/repositories/timescale/timescaledb/script.rpm.sh | sudo bash + ``` + +1. Update your local repository list: + + ```bash + dnf update + ``` + +1. Install $TOOLKIT_LONG: + + ```bash + dnf install timescaledb-toolkit-postgresql-17 + ``` + +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 + dnf update + ``` + +1. Install the latest version of $TOOLKIT_LONG: + + ```bash + dnf 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: + + ```sql + ALTER EXTENSION timescaledb_toolkit UPDATE; + ``` + + + + For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active + sessions. + + + + + + +[brew-install]: https://brew.sh +[cloud]: /use-timescale/:currentVersion:/services/ +[debian-install]: /self-hosted/:currentVersion:/install/installation-linux/ +[docker-install]: /self-hosted/:currentVersion:/install/installation-docker/ +[mst]: /mst/:currentVersion:/ +[rocky-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/ diff --git a/_partials/_toolkit-install-update-source-base.mdx b/_partials/_toolkit-install-update-source-base.mdx new file mode 100644 index 0000000000..4008894b17 --- /dev/null +++ b/_partials/_toolkit-install-update-source-base.mdx @@ -0,0 +1,88 @@ +## Install $TOOLKIT_LONG + +To install $TOOLKIT_SHORT from source, follow the build and installation instructions in the [TimescaleDB Toolkit GitHub repository][toolkit-gh-install]. + +After building and installing from source: + + + +1. **Restart $PG** + + Linux: + ```bash + sudo systemctl restart postgresql + ``` + + macOS with Homebrew: + ```bash + brew services restart postgresql@ + ``` + + Windows - Open Services (press `Win + R`, type `services.msc`, and press Enter). + Find the PostgreSQL service, right-click it, and select `Restart`. + +1. **Connect to your database** + + ```bash + psql -d "postgres://:@:/" + ``` + +1. **Create the $TOOLKIT_SHORT extension** + + At the `psql` prompt: + + ```sql + CREATE EXTENSION timescaledb_toolkit; + ``` + + + +## Update $TOOLKIT_LONG + +To update $TOOLKIT_SHORT installed from source, rebuild and reinstall the latest version. + + + +1. **Download the latest source code** + + Follow the build instructions in the [TimescaleDB Toolkit GitHub repository][toolkit-gh-install] to download and build the latest version. + +1. **Restart $PG** + + Linux: + ```bash + sudo systemctl restart postgresql + ``` + + macOS with Homebrew: + ```bash + brew services restart postgresql@ + ``` + + Windows - Restart the PostgreSQL service via Services. + +1. **Connect to your database** + + ```bash + psql -d "postgres://:@:/" + ``` + +1. **Update the $TOOLKIT_SHORT extension** + + At the `psql` prompt: + + ```sql + ALTER EXTENSION timescaledb_toolkit UPDATE; + ``` + + + + For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active + sessions. + + + + + +[toolkit-gh-install]: https://github.com/timescale/timescaledb-toolkit#-installing-from-source +[source-install]: /self-hosted/:currentVersion:/install/installation-source/ diff --git a/_partials/_toolkit-install-update-windows-base.mdx b/_partials/_toolkit-install-update-windows-base.mdx new file mode 100644 index 0000000000..7bb517b6bc --- /dev/null +++ b/_partials/_toolkit-install-update-windows-base.mdx @@ -0,0 +1,76 @@ +## Prerequisites + +To follow this procedure: + +- [Install $TIMESCALE_DB on Windows][windows-install]. + +## Install $TOOLKIT_LONG + + + +1. Download the latest $TOOLKIT_SHORT Windows installer from the [TimescaleDB Toolkit releases page][toolkit-releases]. + +1. Run the installer and follow the installation wizard. + +1. **Restart the $PG service** + + Open Services (press `Win + R`, type `services.msc`, and press Enter). + Find the PostgreSQL service, right-click it, and select `Restart`. + +1. **Connect to your database** + + ```powershell + psql -U postgres -d + ``` + +1. **Create the $TOOLKIT_SHORT extension** + + At the `psql` prompt: + + ```sql + CREATE EXTENSION timescaledb_toolkit; + ``` + + + +## Update $TOOLKIT_LONG + +Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENSION`. + + + +1. Download the latest $TOOLKIT_SHORT Windows installer from the [TimescaleDB Toolkit releases page][toolkit-releases]. + +1. Run the installer to update to the latest version. + +1. **Restart the $PG service** + + Open Services (press `Win + R`, type `services.msc`, and press Enter). + Find the PostgreSQL service, right-click it, and select `Restart`. + +1. **Connect to your database** + + ```powershell + psql -U postgres -d + ``` + +1. **Update the $TOOLKIT_SHORT extension** + + At the `psql` prompt: + + ```sql + ALTER EXTENSION timescaledb_toolkit UPDATE; + ``` + + + + For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active + sessions. + + + + + +[windows-install]: /self-hosted/:currentVersion:/install/installation-windows/ +[toolkit-releases]: https://github.com/timescale/timescaledb-toolkit/releases +[connect]: /integrations/:currentVersion:/find-connection-details/ diff --git a/_partials/_toolkit-uninstall-debian-base.mdx b/_partials/_toolkit-uninstall-debian-base.mdx new file mode 100644 index 0000000000..2eb4bb3313 --- /dev/null +++ b/_partials/_toolkit-uninstall-debian-base.mdx @@ -0,0 +1,48 @@ +## Uninstall $TOOLKIT_LONG + +If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TIMESCALE_DB or $PG. + + + +1. **Drop the $TOOLKIT_SHORT extension from your databases** + + Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: + + ```bash + psql -d "postgres://:@:/" + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + ``` + + Repeat this for all databases with $TOOLKIT_SHORT enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + + + +1. **Uninstall the $TOOLKIT_SHORT package** + + ```bash + sudo apt remove timescaledb-toolkit-postgresql-17 + ``` + + Replace `17` with your $PG version if different. + +1. **(Optional) Remove dependencies** + + To also remove unused dependencies: + + ```bash + sudo apt autoremove + ``` + + + +[debian-install]: /self-hosted/:currentVersion:/install/installation-linux/ +[connect]: /integrations/:currentVersion:/find-connection-details/ diff --git a/_partials/_toolkit-uninstall-kubernetes-base.mdx b/_partials/_toolkit-uninstall-kubernetes-base.mdx new file mode 100644 index 0000000000..b9da1bfefb --- /dev/null +++ b/_partials/_toolkit-uninstall-kubernetes-base.mdx @@ -0,0 +1,33 @@ +## Uninstall $TOOLKIT_LONG + +$TOOLKIT_SHORT is included in the TimescaleDB HA Docker image and cannot be uninstalled separately. To remove $TOOLKIT_SHORT, you need to remove the entire TimescaleDB deployment. See [Uninstall TimescaleDB from Kubernetes][uninstall-kubernetes]. + +If you only want to remove the extension from a specific database without removing the deployment: + + + +1. **Connect to your TimescaleDB pod** + + ```shell + kubectl exec -it -- psql -U postgres -d + ``` + + Replace `` with your TimescaleDB pod name (for example, `timescaledb-0`). + +1. **Drop the $TOOLKIT_SHORT extension** + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + ``` + + + + Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + + + + + +[uninstall-kubernetes]: /self-hosted/:currentVersion:/uninstall/ diff --git a/_partials/_toolkit-uninstall-redhat-base.mdx b/_partials/_toolkit-uninstall-redhat-base.mdx new file mode 100644 index 0000000000..700611a2a2 --- /dev/null +++ b/_partials/_toolkit-uninstall-redhat-base.mdx @@ -0,0 +1,48 @@ +## Uninstall $TOOLKIT_LONG + +If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TIMESCALE_DB or $PG. + + + +1. **Drop the $TOOLKIT_SHORT extension from your databases** + + Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: + + ```bash + psql -d "postgres://:@:/" + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + ``` + + Repeat this for all databases with $TOOLKIT_SHORT enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + + + +1. **Uninstall the $TOOLKIT_SHORT package** + + ```bash + sudo yum remove timescaledb-toolkit-postgresql-17 + ``` + + Replace `17` with your $PG version if different. + +1. **(Optional) Remove dependencies** + + To also remove unused dependencies: + + ```bash + sudo yum autoremove + ``` + + + +[red-hat-install]: /self-hosted/:currentVersion:/install/installation-linux/ +[connect]: /integrations/:currentVersion:/find-connection-details/ diff --git a/_partials/_toolkit-uninstall-rocky-base.mdx b/_partials/_toolkit-uninstall-rocky-base.mdx new file mode 100644 index 0000000000..17cfde269f --- /dev/null +++ b/_partials/_toolkit-uninstall-rocky-base.mdx @@ -0,0 +1,48 @@ +## Uninstall $TOOLKIT_LONG + +If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TIMESCALE_DB or $PG. + + + +1. **Drop the $TOOLKIT_SHORT extension from your databases** + + Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: + + ```bash + psql -d "postgres://:@:/" + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + ``` + + Repeat this for all databases with $TOOLKIT_SHORT enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + + + +1. **Uninstall the $TOOLKIT_SHORT package** + + ```bash + sudo dnf remove timescaledb-toolkit-postgresql-17 + ``` + + Replace `17` with your $PG version if different. + +1. **(Optional) Remove dependencies** + + To also remove unused dependencies: + + ```bash + sudo dnf autoremove + ``` + + + +[rocky-install]: /self-hosted/:currentVersion:/install/installation-linux/ +[connect]: /integrations/:currentVersion:/find-connection-details/ diff --git a/_partials/_toolkit-uninstall-source-base.mdx b/_partials/_toolkit-uninstall-source-base.mdx new file mode 100644 index 0000000000..731c489eb1 --- /dev/null +++ b/_partials/_toolkit-uninstall-source-base.mdx @@ -0,0 +1,106 @@ +## Uninstall $TOOLKIT_LONG + +If you installed $TOOLKIT_SHORT by building from source, you can uninstall it without removing $TIMESCALE_DB or $PG. + + + +1. **Drop the $TOOLKIT_SHORT extension from your databases** + + Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: + + Linux/macOS: + ```bash + psql -d "postgres://:@:/" + ``` + + Windows: + ```powershell + psql -U postgres -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + ``` + + Repeat this for all databases with $TOOLKIT_SHORT enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + + + +1. **Remove $TOOLKIT_SHORT binaries** + + Manually remove the $TOOLKIT_SHORT files from your $PG installation directory. + + Find your $PG library directory: + + Linux/macOS: + ```bash + pg_config --pkglibdir + ``` + + Windows: + ```powershell + pg_config --pkglibdir + ``` + + Remove $TOOLKIT_SHORT library files: + + Linux/macOS: + ```bash + sudo rm $(pg_config --pkglibdir)/timescaledb_toolkit*.so + ``` + + Windows: + ```powershell + del "C:\Program Files\PostgreSQL\\lib\timescaledb_toolkit*.dll" + ``` + + Find your $PG extension directory: + + Linux/macOS: + ```bash + pg_config --sharedir + ``` + + Windows: + ```powershell + pg_config --sharedir + ``` + + Remove $TOOLKIT_SHORT extension files: + + Linux/macOS: + ```bash + sudo rm -rf $(pg_config --sharedir)/extension/timescaledb_toolkit* + ``` + + Windows: + ```powershell + rmdir /s "C:\Program Files\PostgreSQL\\share\extension\timescaledb_toolkit*" + ``` + + You may need Administrator privileges to delete these files on Windows. + +1. **Restart $PG** + + Linux: + ```bash + sudo systemctl restart postgresql + ``` + + macOS with Homebrew: + ```bash + brew services restart postgresql@ + ``` + + Windows - Open Services (press `Win + R`, type `services.msc`, and press Enter). + Find the PostgreSQL service, right-click it, and select `Restart`. + + + +[source-install]: /self-hosted/:currentVersion:/install/installation-source/ diff --git a/_partials/_toolkit-uninstall-windows-base.mdx b/_partials/_toolkit-uninstall-windows-base.mdx new file mode 100644 index 0000000000..405eae7658 --- /dev/null +++ b/_partials/_toolkit-uninstall-windows-base.mdx @@ -0,0 +1,47 @@ +## Uninstall $TOOLKIT_LONG + +If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TIMESCALE_DB or $PG. + + + +1. **Drop the $TOOLKIT_SHORT extension from your databases** + + Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: + + ```powershell + psql -U postgres -d + ``` + + At the `psql` prompt: + + ```sql + DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + ``` + + Repeat this for all databases with $TOOLKIT_SHORT enabled. To exit psql, type `\q`. + + + + Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + + + +1. **Uninstall the $TOOLKIT_SHORT package** + + Open Settings > Apps > Apps & features. + Search for "TimescaleDB Toolkit", select it, and click `Uninstall`. + + Alternatively, use the Control Panel: + - Open Control Panel > Programs > Programs and Features + - Find "TimescaleDB Toolkit" in the list + - Right-click and select `Uninstall` + +1. **Restart the $PG service** + + Open Services (press `Win + R`, type `services.msc`, and press Enter). + Find the PostgreSQL service, right-click it, and select `Restart`. + + + +[windows-install]: /self-hosted/:currentVersion:/install/installation-windows/ +[connect]: /integrations/:currentVersion:/find-connection-details/ From 4d57066b8a8e9bb97bed733d113907a8ceb55799 Mon Sep 17 00:00:00 2001 From: atovpeko Date: Thu, 4 Dec 2025 15:00:24 +0200 Subject: [PATCH 06/15] minor updates --- .../_toolkit-install-update-source-base.mdx | 52 +++- .../_toolkit-install-update-windows-base.mdx | 76 ------ _partials/_toolkit-uninstall-source-base.mdx | 142 +++++++++- _partials/_toolkit-uninstall-windows-base.mdx | 47 ---- .../install/installation-cloud-image.md | 2 - self-hosted/tooling/install-toolkit.md | 33 ++- self-hosted/uninstall.md | 257 +++++++++++++++--- 7 files changed, 410 insertions(+), 199 deletions(-) delete mode 100644 _partials/_toolkit-install-update-windows-base.mdx delete mode 100644 _partials/_toolkit-uninstall-windows-base.mdx diff --git a/_partials/_toolkit-install-update-source-base.mdx b/_partials/_toolkit-install-update-source-base.mdx index 4008894b17..1317684eac 100644 --- a/_partials/_toolkit-install-update-source-base.mdx +++ b/_partials/_toolkit-install-update-source-base.mdx @@ -8,19 +8,44 @@ After building and installing from source: 1. **Restart $PG** - Linux: + + + + ```bash sudo systemctl restart postgresql ``` - macOS with Homebrew: + + + + ```bash brew services restart postgresql@ ``` - Windows - Open Services (press `Win + R`, type `services.msc`, and press Enter). + + + On macOS, if the extension fails to load after building from source, you may need to create symlinks for library compatibility. The build process creates `.dylib` files, but the extension may expect `.so` files: + + ```bash + ln -sf $(pg_config --pkglibdir)/timescaledb_toolkit.dylib \ + $(pg_config --pkglibdir)/timescaledb_toolkit.so + ``` + + + + + + + + Open Services (press `Win + R`, type `services.msc`, and press Enter). Find the PostgreSQL service, right-click it, and select `Restart`. + + + + 1. **Connect to your database** ```bash @@ -49,17 +74,32 @@ To update $TOOLKIT_SHORT installed from source, rebuild and reinstall the latest 1. **Restart $PG** - Linux: + + + + ```bash sudo systemctl restart postgresql ``` - macOS with Homebrew: + + + + ```bash brew services restart postgresql@ ``` - Windows - Restart the PostgreSQL service via Services. + + + + + Open Services (press `Win + R`, type `services.msc`, and press Enter). + Find the PostgreSQL service, right-click it, and select `Restart`. + + + + 1. **Connect to your database** diff --git a/_partials/_toolkit-install-update-windows-base.mdx b/_partials/_toolkit-install-update-windows-base.mdx deleted file mode 100644 index 7bb517b6bc..0000000000 --- a/_partials/_toolkit-install-update-windows-base.mdx +++ /dev/null @@ -1,76 +0,0 @@ -## Prerequisites - -To follow this procedure: - -- [Install $TIMESCALE_DB on Windows][windows-install]. - -## Install $TOOLKIT_LONG - - - -1. Download the latest $TOOLKIT_SHORT Windows installer from the [TimescaleDB Toolkit releases page][toolkit-releases]. - -1. Run the installer and follow the installation wizard. - -1. **Restart the $PG service** - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - Find the PostgreSQL service, right-click it, and select `Restart`. - -1. **Connect to your database** - - ```powershell - psql -U postgres -d - ``` - -1. **Create the $TOOLKIT_SHORT extension** - - At the `psql` prompt: - - ```sql - CREATE EXTENSION timescaledb_toolkit; - ``` - - - -## Update $TOOLKIT_LONG - -Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENSION`. - - - -1. Download the latest $TOOLKIT_SHORT Windows installer from the [TimescaleDB Toolkit releases page][toolkit-releases]. - -1. Run the installer to update to the latest version. - -1. **Restart the $PG service** - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - Find the PostgreSQL service, right-click it, and select `Restart`. - -1. **Connect to your database** - - ```powershell - psql -U postgres -d - ``` - -1. **Update the $TOOLKIT_SHORT extension** - - At the `psql` prompt: - - ```sql - ALTER EXTENSION timescaledb_toolkit UPDATE; - ``` - - - - For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active - sessions. - - - - - -[windows-install]: /self-hosted/:currentVersion:/install/installation-windows/ -[toolkit-releases]: https://github.com/timescale/timescaledb-toolkit/releases -[connect]: /integrations/:currentVersion:/find-connection-details/ diff --git a/_partials/_toolkit-uninstall-source-base.mdx b/_partials/_toolkit-uninstall-source-base.mdx index 731c489eb1..06a3af7f99 100644 --- a/_partials/_toolkit-uninstall-source-base.mdx +++ b/_partials/_toolkit-uninstall-source-base.mdx @@ -8,16 +8,34 @@ If you installed $TOOLKIT_SHORT by building from source, you can uninstall it wi Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: - Linux/macOS: + + + + + ```bash + psql -d "postgres://:@:/" + ``` + + + + + ```bash psql -d "postgres://:@:/" ``` - Windows: + + + + ```powershell psql -U postgres -d ``` + + + + At the `psql` prompt: ```sql @@ -38,69 +56,165 @@ If you installed $TOOLKIT_SHORT by building from source, you can uninstall it wi Find your $PG library directory: - Linux/macOS: + + + + + ```bash + pg_config --pkglibdir + ``` + + + + + ```bash pg_config --pkglibdir ``` - Windows: + + + + ```powershell pg_config --pkglibdir ``` + + + + Remove $TOOLKIT_SHORT library files: - Linux/macOS: + + + + ```bash sudo rm $(pg_config --pkglibdir)/timescaledb_toolkit*.so ``` - Windows: + + + + + ```bash + sudo rm $(pg_config --pkglibdir)/timescaledb_toolkit*.so + ``` + + + + On macOS, you may also need to remove `.dylib` files: + + ```bash + sudo rm $(pg_config --pkglibdir)/timescaledb_toolkit*.dylib + ``` + + + + + + + ```powershell del "C:\Program Files\PostgreSQL\\lib\timescaledb_toolkit*.dll" ``` + + + + Find your $PG extension directory: - Linux/macOS: + + + + ```bash pg_config --sharedir ``` - Windows: + + + + + ```bash + pg_config --sharedir + ``` + + + + + ```powershell pg_config --sharedir ``` + + + + Remove $TOOLKIT_SHORT extension files: - Linux/macOS: + + + + ```bash sudo rm -rf $(pg_config --sharedir)/extension/timescaledb_toolkit* ``` - Windows: + + + + + ```bash + sudo rm -rf $(pg_config --sharedir)/extension/timescaledb_toolkit* + ``` + + + + + ```powershell rmdir /s "C:\Program Files\PostgreSQL\\share\extension\timescaledb_toolkit*" ``` - You may need Administrator privileges to delete these files on Windows. + You may need Administrator privileges to delete these files. + + + + 1. **Restart $PG** - Linux: + + + + ```bash sudo systemctl restart postgresql ``` - macOS with Homebrew: + + + + ```bash brew services restart postgresql@ ``` - Windows - Open Services (press `Win + R`, type `services.msc`, and press Enter). + + + + + Open Services (press `Win + R`, type `services.msc`, and press Enter). Find the PostgreSQL service, right-click it, and select `Restart`. + + + + [source-install]: /self-hosted/:currentVersion:/install/installation-source/ diff --git a/_partials/_toolkit-uninstall-windows-base.mdx b/_partials/_toolkit-uninstall-windows-base.mdx deleted file mode 100644 index 405eae7658..0000000000 --- a/_partials/_toolkit-uninstall-windows-base.mdx +++ /dev/null @@ -1,47 +0,0 @@ -## Uninstall $TOOLKIT_LONG - -If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TIMESCALE_DB or $PG. - - - -1. **Drop the $TOOLKIT_SHORT extension from your databases** - - Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: - - ```powershell - psql -U postgres -d - ``` - - At the `psql` prompt: - - ```sql - DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; - ``` - - Repeat this for all databases with $TOOLKIT_SHORT enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. - - - -1. **Uninstall the $TOOLKIT_SHORT package** - - Open Settings > Apps > Apps & features. - Search for "TimescaleDB Toolkit", select it, and click `Uninstall`. - - Alternatively, use the Control Panel: - - Open Control Panel > Programs > Programs and Features - - Find "TimescaleDB Toolkit" in the list - - Right-click and select `Uninstall` - -1. **Restart the $PG service** - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - Find the PostgreSQL service, right-click it, and select `Restart`. - - - -[windows-install]: /self-hosted/:currentVersion:/install/installation-windows/ -[connect]: /integrations/:currentVersion:/find-connection-details/ diff --git a/self-hosted/install/installation-cloud-image.md b/self-hosted/install/installation-cloud-image.md index c6c0debaf8..92db039935 100644 --- a/self-hosted/install/installation-cloud-image.md +++ b/self-hosted/install/installation-cloud-image.md @@ -37,8 +37,6 @@ supports public AMIs. -## Installing $TIMESCALE_DB from a pre-build cloud image - 1. Make sure you have an [Amazon Web Services account][aws-signup], and are signed in to [your EC2 dashboard][aws-dashboard]. 1. Navigate to `Images → AMIs`. diff --git a/self-hosted/tooling/install-toolkit.md b/self-hosted/tooling/install-toolkit.md index 7271deabf2..7dd2faea4c 100644 --- a/self-hosted/tooling/install-toolkit.md +++ b/self-hosted/tooling/install-toolkit.md @@ -8,13 +8,11 @@ keywords: [Toolkit, installation, uninstallation, hyperfunctions, function pipel import ToolkitDebianBase from "versionContent/_partials/_toolkit-install-update-debian-base.mdx"; import ToolkitRedhatBase from "versionContent/_partials/_toolkit-install-update-redhat-base.mdx"; import ToolkitRockyBase from "versionContent/_partials/_toolkit-install-update-rocky-base.mdx"; -import ToolkitWindowsBase from "versionContent/_partials/_toolkit-install-update-windows-base.mdx"; import ToolkitKubernetesBase from "versionContent/_partials/_toolkit-install-update-kubernetes-base.mdx"; import ToolkitSourceBase from "versionContent/_partials/_toolkit-install-update-source-base.mdx"; import ToolkitDebianUninstall from "versionContent/_partials/_toolkit-uninstall-debian-base.mdx"; import ToolkitRedhatUninstall from "versionContent/_partials/_toolkit-uninstall-redhat-base.mdx"; import ToolkitRockyUninstall from "versionContent/_partials/_toolkit-uninstall-rocky-base.mdx"; -import ToolkitWindowsUninstall from "versionContent/_partials/_toolkit-uninstall-windows-base.mdx"; import ToolkitKubernetesUninstall from "versionContent/_partials/_toolkit-uninstall-kubernetes-base.mdx"; import ToolkitSourceUninstall from "versionContent/_partials/_toolkit-uninstall-source-base.mdx"; @@ -45,6 +43,8 @@ To get $TOOLKIT_SHORT, use the high availability image, `timescaledb-ha`: docker pull timescale/timescaledb-ha:pg17 ``` +The $TOOLKIT_SHORT extension is pre-installed and pre-enabled in the `timescaledb-ha` image. Once you start the container, the extension is already active in your database and ready to use. No additional installation steps are required. + For more information on running $TIMESCALE_DB using Docker, see [Install TimescaleDB from a Docker container][docker-install]. @@ -179,6 +179,19 @@ installing or using Homebrew, see [the `brew` homepage][brew-install]. CREATE EXTENSION timescaledb_toolkit; ``` + + + If you encounter an error like `could not access file "$libdir/timescaledb_toolkit-X.XX.X"`, you may need to create a symlink from `.so` to `.dylib` format: + + ```bash + ln -sf $(pg_config --pkglibdir)/timescaledb_toolkit-*.so \ + $(pg_config --pkglibdir)/timescaledb_toolkit-*.dylib + ``` + + This is due to a known issue in the Homebrew formula where the library is installed with a `.so` extension, but PostgreSQL on macOS expects a `.dylib` extension. + + + ## Update $TOOLKIT_LONG @@ -249,6 +262,14 @@ If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TI brew uninstall timescaledb-toolkit ``` +1. **(Optional) Remove manual symlinks** + + If you created a manual `.dylib` symlink as a workaround during installation, remove it: + + ```bash + rm $(pg_config --pkglibdir)/timescaledb_toolkit-*.dylib 2>/dev/null || true + ``` + @@ -261,14 +282,6 @@ If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TI - - - - - - - - [brew-install]: https://brew.sh diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index 4bd8d98b5c..ea2bb76956 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -17,8 +17,6 @@ If you installed TimescaleDB using Docker, you can completely remove the Timesca -## Uninstalling TimescaleDB from Docker - 1. **Stop the running container** ```bash @@ -134,8 +132,6 @@ If you deployed TimescaleDB on Kubernetes, you can completely remove all associa -## Uninstalling TimescaleDB from Kubernetes - 1. **Back up your data (optional but recommended)** Before uninstalling, back up any important data from your TimescaleDB instance: @@ -319,14 +315,14 @@ If you're using dynamic provisioning with a storage class, the PersistentVolume +Take the following steps based on your distribution: + -## Uninstalling TimescaleDB from Debian - 1. **Drop the TimescaleDB extension from your databases** Connect to each database where TimescaleDB is enabled and remove the extension: @@ -425,8 +421,6 @@ If you're using dynamic provisioning with a storage class, the PersistentVolume -## Uninstalling TimescaleDB from Ubuntu - 1. **Drop the TimescaleDB extension from your databases** Connect to each database where TimescaleDB is enabled and remove the extension: @@ -525,8 +519,6 @@ If you're using dynamic provisioning with a storage class, the PersistentVolume -## Uninstalling TimescaleDB from RHEL - 1. **Drop the TimescaleDB extension from your databases** Connect to each database where TimescaleDB is enabled and remove the extension: @@ -625,8 +617,6 @@ If you're using dynamic provisioning with a storage class, the PersistentVolume -## Uninstalling TimescaleDB from Fedora - 1. **Drop the TimescaleDB extension from your databases** Connect to each database where TimescaleDB is enabled and remove the extension: @@ -725,8 +715,6 @@ If you're using dynamic provisioning with a storage class, the PersistentVolume -## Uninstalling TimescaleDB from Rocky Linux - 1. **Drop the TimescaleDB extension from your databases** Connect to each database where TimescaleDB is enabled and remove the extension: @@ -827,14 +815,14 @@ If you're using dynamic provisioning with a storage class, the PersistentVolume +Uninstall $SELF_LONG with Homebrew or MacPorts. + -## Uninstalling TimescaleDB using Homebrew - 1. **Drop the TimescaleDB extension from your databases** At the `psql` prompt, remove the TimescaleDB extension: @@ -893,8 +881,6 @@ If you're using dynamic provisioning with a storage class, the PersistentVolume -## Uninstalling TimescaleDB using MacPorts - 1. **Drop the TimescaleDB extension from your databases** At the `psql` prompt, remove the TimescaleDB extension: @@ -953,22 +939,38 @@ If you installed TimescaleDB by building from source, you can uninstall it witho -## Uninstalling TimescaleDB installed from source - 1. **Drop the TimescaleDB extension from your databases** Connect to each database where TimescaleDB is enabled and remove the extension: - Linux: + + + + ```bash sudo -u postgres psql -d ``` - Windows: + + + + + ```bash + psql -U postgres -d + ``` + + + + + ```powershell psql -U postgres -d ``` + + + + At the `psql` prompt: ```sql @@ -987,28 +989,65 @@ If you installed TimescaleDB by building from source, you can uninstall it witho Locate your PostgreSQL configuration file: - Linux: + + + + ```bash psql -d postgres -c "SHOW config_file;" ``` - Windows: + + + + + ```bash + psql -d postgres -c "SHOW config_file;" + ``` + + + + + ```powershell psql -U postgres -d postgres -c "SHOW config_file;" ``` + + + + Edit the configuration file (you may need sudo/Administrator privileges): - Linux: + + + + ```bash sudo nano /path/to/postgresql.conf ``` - Windows: Open the configuration file in a text editor as Administrator. The default location is: + + + + + ```bash + sudo nano /path/to/postgresql.conf + ``` + + + + + + Open the configuration file in a text editor as Administrator. The default location is: ``` C:\Program Files\PostgreSQL\\data\postgresql.conf ``` + + + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: ``` @@ -1027,7 +1066,10 @@ If you installed TimescaleDB by building from source, you can uninstall it witho 1. **Restart PostgreSQL** - Linux: + + + + ```bash sudo service postgresql restart ``` @@ -1038,13 +1080,19 @@ If you installed TimescaleDB by building from source, you can uninstall it witho sudo systemctl restart postgresql ``` - macOS with Homebrew: + + + ```bash brew services restart postgresql@ ``` - Windows - Open Services (press `Win + R`, type `services.msc`, and press Enter). + + + + + Open Services (press `Win + R`, type `services.msc`, and press Enter). Find the PostgreSQL service, right-click it, and select `Restart`. @@ -1054,90 +1102,213 @@ If you installed TimescaleDB by building from source, you can uninstall it witho pg_ctl restart ``` + + + + 1. **Remove TimescaleDB binaries** Manually remove the TimescaleDB files from your PostgreSQL installation directory. Find your PostgreSQL library directory: - Linux/macOS: + + + + ```bash pg_config --pkglibdir ``` - Windows: + + + + + ```bash + pg_config --pkglibdir + ``` + + + + + ```powershell pg_config --pkglibdir ``` + + + + Remove TimescaleDB library files: - Linux/macOS: + + + + ```bash sudo rm $(pg_config --pkglibdir)/timescaledb*.so ``` - Windows: + + + + + ```bash + sudo rm $(pg_config --pkglibdir)/timescaledb*.so + ``` + + + + On macOS, you may also need to remove `.dylib` files: + + ```bash + sudo rm $(pg_config --pkglibdir)/timescaledb*.dylib + ``` + + + + + + + ```powershell del "C:\Program Files\PostgreSQL\\lib\timescaledb*.dll" ``` + + + + Find your PostgreSQL extension directory: - Linux/macOS: + + + + + ```bash + pg_config --sharedir + ``` + + + + + ```bash pg_config --sharedir ``` - Windows: + + + + ```powershell pg_config --sharedir ``` + + + + Remove TimescaleDB extension files: - Linux/macOS: + + + + ```bash sudo rm -rf $(pg_config --sharedir)/extension/timescaledb* ``` - Windows: + + + + + ```bash + sudo rm -rf $(pg_config --sharedir)/extension/timescaledb* + ``` + + + + + ```powershell rmdir /s "C:\Program Files\PostgreSQL\\share\extension\timescaledb*" ``` - You may need Administrator privileges to delete these files on Windows. + You may need Administrator privileges to delete these files. + + + + 1. **(Optional) Remove the TimescaleDB source directory** If you no longer need the source code: - Linux/macOS: + + + + + ```bash + cd /path/to/parent/directory + rm -rf timescaledb + ``` + + + + + ```bash cd /path/to/parent/directory rm -rf timescaledb ``` - Windows: + + + + ```powershell cd \path\to\parent\directory rmdir /s timescaledb ``` + + + + 1. **Verify removal** Connect to PostgreSQL and check that the extension is not available: - Linux/macOS: + + + + ```bash psql -U postgres ``` - Windows: + + + + + ```bash + psql -U postgres + ``` + + + + + ```powershell psql -U postgres ``` + + + + Try to create the extension: ```sql @@ -1197,8 +1368,6 @@ If you installed TimescaleDB on Windows using a package manager, you can uninsta -## Uninstalling TimescaleDB from Windows - 1. **Drop the TimescaleDB extension from your databases** Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: From 18cd0fc77a99a79250cd0d82dfbb9f73085e18c6 Mon Sep 17 00:00:00 2001 From: atovpeko Date: Thu, 4 Dec 2025 18:09:56 +0200 Subject: [PATCH 07/15] minor updates --- self-hosted/tooling/install-toolkit.md | 2 +- self-hosted/uninstall.md | 593 ++++++------------------- 2 files changed, 140 insertions(+), 455 deletions(-) diff --git a/self-hosted/tooling/install-toolkit.md b/self-hosted/tooling/install-toolkit.md index 7dd2faea4c..d521f60833 100644 --- a/self-hosted/tooling/install-toolkit.md +++ b/self-hosted/tooling/install-toolkit.md @@ -188,7 +188,7 @@ installing or using Homebrew, see [the `brew` homepage][brew-install]. $(pg_config --pkglibdir)/timescaledb_toolkit-*.dylib ``` - This is due to a known issue in the Homebrew formula where the library is installed with a `.so` extension, but PostgreSQL on macOS expects a `.dylib` extension. + This is due to a known issue in the Homebrew formula where the library is installed with a `.so` extension, but $PG on macOS expects a `.dylib` extension. diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index ea2bb76956..d83cdf0c63 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -7,7 +7,7 @@ keywords: [uninstall] # Uninstall TimescaleDB -If you want to uninstall TimescaleDB, you can do so without having to uninstall PostgreSQL. Choose your platform or installation method below to see the appropriate uninstallation instructions. +You can uninstall TimescaleDB without uninstalling Postgres. Choose your platform below. @@ -23,11 +23,7 @@ If you installed TimescaleDB using Docker, you can completely remove the Timesca docker stop timescaledb ``` - If you named your container differently when you created it, replace `timescaledb` with your container name. You can list all running containers with: - - ```bash - docker ps - ``` + If you named your container differently when you created it, replace `timescaledb` with your container name. 1. **Remove the container** @@ -39,23 +35,23 @@ If you installed TimescaleDB using Docker, you can completely remove the Timesca 1. **List and remove the Docker image** - To see which TimescaleDB images you have installed: + 1. See which TimescaleDB images you have installed: - ```bash - docker images | grep timescale - ``` + ```bash + docker images | grep timescale + ``` - Remove the specific TimescaleDB image: + 1. Remove the specific TimescaleDB image: - ```bash - # For TimescaleDB-HA - docker rmi timescale/timescaledb-ha:pg17 + ```bash + # For TimescaleDB-HA + docker rmi timescale/timescaledb-ha:pg17 - # For TimescaleDB light - docker rmi timescale/timescaledb:latest-pg17 - ``` + # For TimescaleDB light + docker rmi timescale/timescaledb:latest-pg17 + ``` - Replace `pg17` with your PostgreSQL version if different. + Replace `pg17` with your Postgres version if different. 1. **(Optional) Remove the data volume** @@ -83,47 +79,8 @@ If you installed TimescaleDB using Docker, you can completely remove the Timesca rm -rf ``` -1. **Verify removal** - - Confirm that the container, image, and volumes have been removed: - - ```bash - # Check for containers - docker ps -a | grep timescaledb - - # Check for images - docker images | grep timescale - - # Check for volumes - docker volume ls - ``` - -### Remove all unused Docker resources - -If you want to clean up all unused Docker resources (not just TimescaleDB), you can use: - -```bash -# Remove all stopped containers -docker container prune - -# Remove all unused images -docker image prune -a - -# Remove all unused volumes -docker volume prune - -# Remove all unused resources (containers, images, volumes, networks) -docker system prune -a --volumes -``` - - - -These commands will remove all unused Docker resources, not just TimescaleDB. Use with caution if you have other Docker containers or images you want to keep. - - - @@ -146,7 +103,7 @@ If you deployed TimescaleDB on Kubernetes, you can completely remove all associa -1. **Delete the test pod (if it exists)** +1. **Delete the test pod, if it exists** If you created a test pod during installation: @@ -178,7 +135,7 @@ If you deployed TimescaleDB on Kubernetes, you can completely remove all associa kubectl delete statefulset timescaledb ``` - This will terminate the TimescaleDB pod(s). + This terminates the TimescaleDB pod. 1. **Delete the PersistentVolumeClaim** @@ -202,120 +159,26 @@ If you deployed TimescaleDB on Kubernetes, you can completely remove all associa 1. **(Optional) Delete the namespace** - If you created a dedicated namespace for TimescaleDB and want to remove it: + If you created a dedicated namespace for TimescaleDB, you can remove it as well. - ```shell - kubectl delete namespace timescale - ``` - - + Only delete the namespace if you're certain no other resources are using it. This will delete all resources in the namespace. -1. **Verify removal** - - Confirm that all TimescaleDB resources have been deleted: - ```shell - # Check for StatefulSets - kubectl get statefulsets - - # Check for Services - kubectl get services - - # Check for PVCs - kubectl get pvc - - # Check for Secrets - kubectl get secrets - - # Check for Pods - kubectl get pods + kubectl delete namespace timescale ``` - TimescaleDB-related resources should not appear in these lists. -### Uninstalling TimescaleDB installed with Kubernetes operators - -If you installed TimescaleDB using a Kubernetes operator (StackGres, Patroni, PGO, or CloudNativePG), follow the operator-specific uninstallation instructions: - -**StackGres** - -```shell -kubectl delete sgcluster -kubectl delete sgpgconfig -``` - -For complete uninstallation: - -```shell -helm uninstall stackgres-operator --namespace stackgres -kubectl delete namespace stackgres -``` - -**PostgreSQL Operator (Patroni/Zalando)** - -```shell -kubectl delete postgresql -``` - -To uninstall the operator: - -```shell -kubectl delete -f https://raw.githubusercontent.com/zalando/postgres-operator/master/manifests/postgresql-operator.yaml -``` - -**PGO (Crunchy Data)** - -```shell -kubectl delete postgrescluster -``` - -To uninstall the operator: - -```shell -kubectl delete -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/master/installers/kubectl/postgres-operator.yml -``` - -**CloudNativePG** - -```shell -kubectl delete cluster -``` - -To uninstall the operator: - -```shell -kubectl delete -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.23/releases/cnpg-1.23.0.yaml -``` - -### Clean up persistent volumes - -After deleting the PersistentVolumeClaim, you may also want to delete the associated PersistentVolume if it was manually provisioned: - -```shell -# List persistent volumes -kubectl get pv - -# Delete a specific persistent volume -kubectl delete pv -``` - - - -If you're using dynamic provisioning with a storage class, the PersistentVolume should be automatically deleted when you delete the PersistentVolumeClaim, depending on your reclaim policy. - - - -Take the following steps based on your distribution: +Take the following steps to uninstall $TIMESCALE_DB based on your distribution: @@ -325,17 +188,17 @@ Take the following steps based on your distribution: 1. **Drop the TimescaleDB extension from your databases** - Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where TimescaleDB is enabled and remove the extension: - ```bash - sudo -u postgres psql -d - ``` + ```bash + sudo -u postgres psql -d + ``` - At the `psql` prompt: + 1. At the `psql` prompt: - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. @@ -347,7 +210,7 @@ Take the following steps based on your distribution: 1. **Remove TimescaleDB from `shared_preload_libraries`** - Edit the PostgreSQL configuration file: + Edit the Postgres configuration file: ```bash sudo nano /etc/postgresql/17/main/postgresql.conf @@ -367,7 +230,7 @@ Take the following steps based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. -1. **Restart PostgreSQL** +1. **Restart Postgres** ```bash sudo systemctl restart postgresql @@ -379,7 +242,7 @@ Take the following steps based on your distribution: sudo apt remove timescaledb-2-postgresql-17 ``` - Replace `17` with your PostgreSQL version if different. + Replace `17` with your Postgres version if different. 1. **Remove the TimescaleDB repository configuration** @@ -397,22 +260,6 @@ Take the following steps based on your distribution: sudo apt autoremove ``` -1. **Verify removal** - - Connect to PostgreSQL and verify the extension is no longer available: - - ```bash - psql -U postgres -d - ``` - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. - @@ -423,17 +270,17 @@ Take the following steps based on your distribution: 1. **Drop the TimescaleDB extension from your databases** - Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where TimescaleDB is enabled and remove the extension: - ```bash - sudo -u postgres psql -d - ``` + ```bash + sudo -u postgres psql -d + ``` - At the `psql` prompt: + 1. At the `psql` prompt: - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. @@ -445,7 +292,7 @@ Take the following steps based on your distribution: 1. **Remove TimescaleDB from `shared_preload_libraries`** - Edit the PostgreSQL configuration file: + Edit the Postgres configuration file: ```bash sudo nano /etc/postgresql/17/main/postgresql.conf @@ -465,7 +312,7 @@ Take the following steps based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. -1. **Restart PostgreSQL** +1. **Restart Postgres** ```bash sudo systemctl restart postgresql @@ -477,7 +324,7 @@ Take the following steps based on your distribution: sudo apt remove timescaledb-2-postgresql-17 ``` - Replace `17` with your PostgreSQL version if different. + Replace `17` with your Postgres version if different. 1. **Remove the TimescaleDB repository configuration** @@ -495,22 +342,6 @@ Take the following steps based on your distribution: sudo apt autoremove ``` -1. **Verify removal** - - Connect to PostgreSQL and verify the extension is no longer available: - - ```bash - psql -U postgres -d - ``` - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. - @@ -521,17 +352,17 @@ Take the following steps based on your distribution: 1. **Drop the TimescaleDB extension from your databases** - Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where TimescaleDB is enabled and remove the extension: - ```bash - sudo -u postgres psql -d - ``` + ```bash + sudo -u postgres psql -d + ``` - At the `psql` prompt: + 1. At the `psql` prompt: - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. @@ -543,7 +374,7 @@ Take the following steps based on your distribution: 1. **Remove TimescaleDB from `shared_preload_libraries`** - Edit the PostgreSQL configuration file: + Edit the Postgres configuration file: ```bash sudo nano /var/lib/pgsql/17/data/postgresql.conf @@ -563,13 +394,13 @@ Take the following steps based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. -1. **Restart PostgreSQL** +1. **Restart Postgres** ```bash sudo systemctl restart postgresql-17 ``` - Replace `17` with your PostgreSQL version if different. + Replace `17` with your Postgres version if different. 1. **Uninstall the TimescaleDB package** @@ -577,7 +408,7 @@ Take the following steps based on your distribution: sudo dnf remove timescaledb_17 ``` - Replace `17` with your PostgreSQL version if different. + Replace `17` with your Postgres version if different. 1. **Remove the TimescaleDB repository configuration** @@ -593,22 +424,6 @@ Take the following steps based on your distribution: sudo dnf autoremove ``` -1. **Verify removal** - - Connect to PostgreSQL and verify the extension is no longer available: - - ```bash - psql -U postgres -d - ``` - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. - @@ -619,17 +434,17 @@ Take the following steps based on your distribution: 1. **Drop the TimescaleDB extension from your databases** - Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where TimescaleDB is enabled and remove the extension: - ```bash - sudo -u postgres psql -d - ``` + ```bash + sudo -u postgres psql -d + ``` - At the `psql` prompt: + 1. At the `psql` prompt: - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. @@ -641,7 +456,7 @@ Take the following steps based on your distribution: 1. **Remove TimescaleDB from `shared_preload_libraries`** - Edit the PostgreSQL configuration file: + Edit the Postgres configuration file: ```bash sudo nano /var/lib/pgsql/17/data/postgresql.conf @@ -661,13 +476,13 @@ Take the following steps based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. -1. **Restart PostgreSQL** +1. **Restart Postgres** ```bash sudo systemctl restart postgresql-17 ``` - Replace `17` with your PostgreSQL version if different. + Replace `17` with your Postgres version if different. 1. **Uninstall the TimescaleDB package** @@ -675,7 +490,7 @@ Take the following steps based on your distribution: sudo dnf remove timescaledb_17 ``` - Replace `17` with your PostgreSQL version if different. + Replace `17` with your Postgres version if different. 1. **Remove the TimescaleDB repository configuration** @@ -691,22 +506,6 @@ Take the following steps based on your distribution: sudo dnf autoremove ``` -1. **Verify removal** - - Connect to PostgreSQL and verify the extension is no longer available: - - ```bash - psql -U postgres -d - ``` - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. - @@ -717,17 +516,17 @@ Take the following steps based on your distribution: 1. **Drop the TimescaleDB extension from your databases** - Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where TimescaleDB is enabled and remove the extension: - ```bash - sudo -u postgres psql -d - ``` + ```bash + sudo -u postgres psql -d + ``` - At the `psql` prompt: + 1. At the `psql` prompt: - ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; - ``` + ```sql + DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + ``` Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. @@ -739,7 +538,7 @@ Take the following steps based on your distribution: 1. **Remove TimescaleDB from `shared_preload_libraries`** - Edit the PostgreSQL configuration file: + Edit the Postgres configuration file: ```bash sudo nano /var/lib/pgsql/17/data/postgresql.conf @@ -759,13 +558,13 @@ Take the following steps based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. -1. **Restart PostgreSQL** +1. **Restart Postgres** ```bash sudo systemctl restart postgresql-17 ``` - Replace `17` with your PostgreSQL version if different. + Replace `17` with your Postgres version if different. 1. **Uninstall the TimescaleDB package** @@ -773,7 +572,7 @@ Take the following steps based on your distribution: sudo dnf remove timescaledb_17 ``` - Replace `17` with your PostgreSQL version if different. + Replace `17` with your Postgres version if different. 1. **Remove the TimescaleDB repository configuration** @@ -789,22 +588,6 @@ Take the following steps based on your distribution: sudo dnf autoremove ``` -1. **Verify removal** - - Connect to PostgreSQL and verify the extension is no longer available: - - ```bash - psql -U postgres -d - ``` - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. - @@ -831,7 +614,7 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. DROP EXTENSION timescaledb; ``` -1. **Remove TimescaleDB from shared_preload_libraries** +1. **Remove TimescaleDB from `shared_preload_libraries`** At the command prompt, remove `timescaledb` from `shared_preload_libraries` in the `postgresql.conf` configuration file: @@ -840,27 +623,14 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. shared_preload_libraries = '' ``` -1. **Save the changes** to the `postgresql.conf` file. +1. **Save the changes to the `postgresql.conf` file** -1. **Restart PostgreSQL** +1. **Restart Postgres** ```bash brew services restart postgresql ``` -1. **Verify the extension is uninstalled** - - Check that the TimescaleDB extension is uninstalled by using the `\dx` command at the `psql` prompt. Output is similar to: - - ```sql - tsdb-# \dx - List of installed extensions - Name | Version | Schema | Description - -------------+---------+------------+------------------------------------------------------------------- - plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - (1 row) - ``` - 1. **Uninstall TimescaleDB** ```bash @@ -889,7 +659,7 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. DROP EXTENSION timescaledb; ``` -1. **Remove TimescaleDB from shared_preload_libraries** +1. **Remove TimescaleDB from `shared_preload_libraries`** At the command prompt, remove `timescaledb` from `shared_preload_libraries` in the `postgresql.conf` configuration file: @@ -898,27 +668,13 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. shared_preload_libraries = '' ``` -1. **Save the changes** to the `postgresql.conf` file. - -1. **Restart PostgreSQL** +1. **Save the changes to the `postgresql.conf` file** +1. **Restart Postgres** ```bash port reload postgresql ``` -1. **Verify the extension is uninstalled** - - Check that the TimescaleDB extension is uninstalled by using the `\dx` command at the `psql` prompt. Output is similar to: - - ```sql - tsdb-# \dx - List of installed extensions - Name | Version | Schema | Description - -------------+---------+------------+------------------------------------------------------------------- - plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - (1 row) - ``` - 1. **Uninstall TimescaleDB and the related dependencies** ```bash @@ -935,7 +691,7 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. -If you installed TimescaleDB by building from source, you can uninstall it without removing PostgreSQL. +If you installed TimescaleDB by building from source, you can uninstall it without removing Postgres. @@ -985,9 +741,9 @@ If you installed TimescaleDB by building from source, you can uninstall it witho -1. **Remove TimescaleDB from shared_preload_libraries** +1. **Remove TimescaleDB from `shared_preload_libraries`** - Locate your PostgreSQL configuration file: + Locate your Postgres configuration file: @@ -1017,7 +773,7 @@ If you installed TimescaleDB by building from source, you can uninstall it witho - Edit the configuration file (you may need sudo/Administrator privileges): + Edit the configuration file. You may need sudo/Administrator privileges: @@ -1064,9 +820,9 @@ If you installed TimescaleDB by building from source, you can uninstall it witho Save the file. -1. **Restart PostgreSQL** +1. **Restart Postgres** - + @@ -1108,9 +864,9 @@ If you installed TimescaleDB by building from source, you can uninstall it witho 1. **Remove TimescaleDB binaries** - Manually remove the TimescaleDB files from your PostgreSQL installation directory. + Manually remove the TimescaleDB files from your Postgres installation directory. - Find your PostgreSQL library directory: + Find your Postgres library directory: @@ -1180,7 +936,7 @@ If you installed TimescaleDB by building from source, you can uninstall it witho - Find your PostgreSQL extension directory: + Find your Postgres extension directory: @@ -1277,128 +1033,47 @@ If you installed TimescaleDB by building from source, you can uninstall it witho -1. **Verify removal** - - Connect to PostgreSQL and check that the extension is not available: - - - - - - ```bash - psql -U postgres - ``` - - - - - - ```bash - psql -U postgres - ``` - - - - - - ```powershell - psql -U postgres - ``` - - - - - - Try to create the extension: - - ```sql - CREATE EXTENSION timescaledb; - ``` - - You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. - -### Additional cleanup for source installations - -After uninstalling, you may want to remove any additional TimescaleDB-related files: - -**Remove TimescaleDB tools** - -If you installed `timescaledb-tune` or other tools from source, remove them: - -Linux/macOS: -```bash -# Find where timescaledb-tune is installed -which timescaledb-tune - -# Remove it -sudo rm $(which timescaledb-tune) -``` - -Windows: -```powershell -# Find where timescaledb-tune is installed -where timescaledb-tune - -# Remove it -del "path\to\timescaledb-tune.exe" -``` - -**Clean up environment variables** - -If you added TimescaleDB paths to your `PATH` environment variable during installation, remove them: - -Linux/macOS: -Edit your shell configuration file (`~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`) and remove any TimescaleDB-related PATH entries. - -Windows: -1. Search for "environment variables" in the Windows Search tool -1. Click `Edit the system environment variables` -1. Click `Environment Variables` -1. Under `System variables` or `User variables`, select `Path` and click `Edit` -1. Remove any entries related to TimescaleDB -1. Click `OK` to save - -If you installed TimescaleDB on Windows using a package manager, you can uninstall it without removing PostgreSQL. +If you installed $TIMESCALE_DB on Windows using a package manager, you can uninstall it without removing $PG. -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - Open Command Prompt or PowerShell and connect to each database where TimescaleDB is enabled: + 1. Open Command Prompt or PowerShell and connect to each database where $TIMESCALE_DB is enabled: - ```bash - psql -U postgres -d - ``` + ```bash + psql -U postgres -d + ``` - At the `psql` prompt, remove the extension: + 1. At the `psql` prompt, remove the extension: - ```sql - DROP EXTENSION IF EXISTS timescaledb CASCADE; - ``` + ```sql + DROP EXTENSION IF EXISTS timescaledb CASCADE; + ``` - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + Using `CASCADE` will drop all $TIMESCALE_DB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. -1. **Remove TimescaleDB from shared_preload_libraries** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - Locate your PostgreSQL configuration file. The default location is: + Locate your $PG configuration file. The default location is: ``` C:\Program Files\PostgreSQL\\data\postgresql.conf ``` - Open the file in a text editor (you may need to run the editor as Administrator). + Open the file in a text editor. You may need to run the editor as Administrator. Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: @@ -1416,41 +1091,51 @@ If you installed TimescaleDB on Windows using a package manager, you can uninsta Save the file. -1. **Restart PostgreSQL** +1. **Restart $PG** - Open Services (press `Win + R`, type `services.msc`, and press Enter). + ```powershell + Restart-Service postgresql-x64-17 + ``` - Find the PostgreSQL service, right-click it, and select `Restart`. + Replace `17` with your $PG version if different. - Alternatively, from an Administrator Command Prompt or PowerShell: +1. **Remove $TIMESCALE_DB binaries** - ```powershell - pg_ctl restart - ``` + Manually remove the $TIMESCALE_DB files from your $PG installation directory. -1. **Uninstall TimescaleDB** + 1. Find your $PG library directory: - Open Control Panel and navigate to "Programs and Features" or "Add or Remove Programs". + ```powershell + pg_config --pkglibdir + ``` - Find "TimescaleDB" in the list of installed programs, select it, and click "Uninstall". + 1. Remove $TIMESCALE_DB library files. You may need to run PowerShell as Administrator: - Follow the uninstaller prompts to complete the removal. + ```powershell + Remove-Item "C:\Program Files\PostgreSQL\17\lib\timescaledb*.dll" + ``` -1. **Verify removal** + Replace `17` with your $PG version if different. - Connect to PostgreSQL and check that the extension is not available: + 1. Find your $PG extension directory: - ```powershell - psql -U postgres - ``` + ```powershell + pg_config --sharedir + ``` - Try to create the extension: + 1. Remove $TIMESCALE_DB extension files: - ```sql - CREATE EXTENSION timescaledb; - ``` + ```powershell + Remove-Item -Recurse "C:\Program Files\PostgreSQL\17\share\extension\timescaledb*" + ``` - You should see an error indicating the extension is not found. This confirms TimescaleDB has been successfully uninstalled. + Replace `17` with your $PG version if different. + + + + If you encounter permission errors, ensure you're running PowerShell as Administrator. + + From ff5ea6506c68e040e1b5791c37af6c8ce9c059d6 Mon Sep 17 00:00:00 2001 From: atovpeko Date: Tue, 16 Dec 2025 16:53:09 +0200 Subject: [PATCH 08/15] latest updates --- self-hosted/uninstall.md | 78 +++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 24 deletions(-) diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index d83cdf0c63..987e18b47a 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -252,9 +252,15 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: sudo apt update ``` -1. **(Optional) Remove dependencies** +1. **Remove dependencies** - To also remove unused dependencies: + Remove unused dependencies installed with TimescaleDB: + + + + This step may also remove PostgreSQL as a dependency. + + ```bash sudo apt autoremove @@ -334,9 +340,15 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: sudo apt update ``` -1. **(Optional) Remove dependencies** +1. **Remove dependencies** + + Remove unused dependencies installed with TimescaleDB: + + - To also remove unused dependencies: + This step may also remove PostgreSQL as a dependency. + + ```bash sudo apt autoremove @@ -377,10 +389,10 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: Edit the Postgres configuration file: ```bash - sudo nano /var/lib/pgsql/17/data/postgresql.conf + sudo vi /var/lib/pgsql/17/data/postgresql.conf ``` - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + Press `/` to search, type `shared_preload_libraries`, and press Enter. Press `i` to edit. Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: ``` shared_preload_libraries = 'timescaledb' @@ -392,7 +404,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: shared_preload_libraries = '' ``` - If there are other extensions in the list, keep them and only remove `timescaledb`. + If there are other extensions in the list, keep them and only remove `timescaledb`. Press `Esc`, then type `:wq` and press Enter to save. 1. **Restart Postgres** @@ -405,7 +417,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Uninstall the TimescaleDB package** ```bash - sudo dnf remove timescaledb_17 + sudo dnf remove timescaledb-2-postgresql-17 ``` Replace `17` with your Postgres version if different. @@ -413,12 +425,18 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Remove the TimescaleDB repository configuration** ```bash - sudo rm /etc/yum.repos.d/timescaledb.repo + sudo rm /etc/yum.repos.d/timescale_timescaledb.repo ``` -1. **(Optional) Remove dependencies** +1. **Remove dependencies** + + Remove unused dependencies installed with TimescaleDB: + + + + This step may also remove PostgreSQL as a dependency. - To also remove unused dependencies: + ```bash sudo dnf autoremove @@ -459,10 +477,10 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: Edit the Postgres configuration file: ```bash - sudo nano /var/lib/pgsql/17/data/postgresql.conf + sudo vi /var/lib/pgsql/17/data/postgresql.conf ``` - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + Press `/` to search, type `shared_preload_libraries`, and press Enter. Press `i` to edit. Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: ``` shared_preload_libraries = 'timescaledb' @@ -487,7 +505,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Uninstall the TimescaleDB package** ```bash - sudo dnf remove timescaledb_17 + sudo dnf remove timescaledb-2-postgresql-17 ``` Replace `17` with your Postgres version if different. @@ -495,12 +513,18 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Remove the TimescaleDB repository configuration** ```bash - sudo rm /etc/yum.repos.d/timescaledb.repo + sudo rm /etc/yum.repos.d/timescale_timescaledb.repo ``` -1. **(Optional) Remove dependencies** +1. **Remove dependencies** + + Remove unused dependencies installed with TimescaleDB: - To also remove unused dependencies: + + + This step may also remove PostgreSQL as a dependency. + + ```bash sudo dnf autoremove @@ -541,10 +565,10 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: Edit the Postgres configuration file: ```bash - sudo nano /var/lib/pgsql/17/data/postgresql.conf + sudo vi /var/lib/pgsql/17/data/postgresql.conf ``` - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + Press `/` to search, type `shared_preload_libraries`, and press Enter. Press `i` to edit. Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: ``` shared_preload_libraries = 'timescaledb' @@ -556,7 +580,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: shared_preload_libraries = '' ``` - If there are other extensions in the list, keep them and only remove `timescaledb`. + If there are other extensions in the list, keep them and only remove `timescaledb`. Press `Esc`, then type `:wq` and press Enter to save. 1. **Restart Postgres** @@ -569,7 +593,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Uninstall the TimescaleDB package** ```bash - sudo dnf remove timescaledb_17 + sudo dnf remove timescaledb-2-postgresql-17 ``` Replace `17` with your Postgres version if different. @@ -577,12 +601,18 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Remove the TimescaleDB repository configuration** ```bash - sudo rm /etc/yum.repos.d/timescaledb.repo + sudo rm /etc/yum.repos.d/timescale_timescaledb.repo ``` -1. **(Optional) Remove dependencies** +1. **Remove dependencies** - To also remove unused dependencies: + Remove unused dependencies installed with TimescaleDB: + + + + This step may also remove PostgreSQL as a dependency. + + ```bash sudo dnf autoremove From b9e07e3e455321126c3b8fb15e0d8ed4087669d2 Mon Sep 17 00:00:00 2001 From: billy-the-fish Date: Tue, 16 Dec 2025 18:38:48 +0100 Subject: [PATCH 09/15] chore: docker and kubernetes check. --- _partials/_add-timescaledb-to-a-database.md | 2 +- .../_install-self-hosted-docker-based.mdx | 26 +- _partials/_kubernetes-install-self-hosted.md | 6 +- _partials/_start-coding-ruby.md | 6 +- self-hosted/configuration/configuration.md | 2 +- self-hosted/configuration/docker-config.md | 2 +- self-hosted/tooling/install-toolkit.md | 2 +- self-hosted/uninstall.md | 250 +++++++++--------- self-hosted/upgrades/upgrade-docker.md | 12 +- use-timescale/extensions/pgcrypto.md | 4 +- use-timescale/extensions/postgis.md | 4 +- 11 files changed, 157 insertions(+), 159 deletions(-) diff --git a/_partials/_add-timescaledb-to-a-database.md b/_partials/_add-timescaledb-to-a-database.md index 90b95c8216..fb45d1ea13 100644 --- a/_partials/_add-timescaledb-to-a-database.md +++ b/_partials/_add-timescaledb-to-a-database.md @@ -28,7 +28,7 @@ Name | Version | Schema | Description -------------+---------+------------+--------------------------------------------------------------------------------------- plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - timescaledb | 2.17.2 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) + timescaledb | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) ``` Press q to exit the list of extensions. diff --git a/_partials/_install-self-hosted-docker-based.mdx b/_partials/_install-self-hosted-docker-based.mdx index bcef817d72..fb882369b2 100644 --- a/_partials/_install-self-hosted-docker-based.mdx +++ b/_partials/_install-self-hosted-docker-based.mdx @@ -10,10 +10,10 @@ $TIMESCALE_DB experience. It uses [Ubuntu][ubuntu], includes [$TOOLKIT_LONG](https://github.com/timescale/timescaledb-toolkit), and support for PostGIS and Patroni. - To install the latest release based on $PG 17: + To install the latest release based on $PG 18: ``` - docker pull timescale/timescaledb-ha:pg17 + docker pull timescale/timescaledb-ha:pg18 ``` $TIMESCALE_DB is pre-created in the default $PG database and is added by default to any new database you create in this image. @@ -22,7 +22,7 @@ Replace `` with the path to the folder you want to keep your data in the following command. ``` - docker run -d --name timescaledb -p 5432:5432 -v :/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg17 + docker run -d --name timescaledb -p 5432:5432 -v :/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg18 ``` If you are running multiple container instances, change the port each Docker instance runs on. @@ -53,11 +53,11 @@ You see the list of installed extensions: ```sql - Name | Version | Schema | Description - ---------------------+---------+------------+--------------------------------------------------------------------------------------- - plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - timescaledb | 2.20.3 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) - timescaledb_toolkit | 1.21.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities + Name | Version | Default version | Schema | Description + ---------------------+---------+-----------------+------------+--------------------------------------------------------------------------------------- + plpgsql | 1.0 | 1.0 | pg_catalog | PL/pgSQL procedural language + timescaledb | 2.24.0 | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) + timescaledb_toolkit | 1.22.0 | 1.22.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities (3 rows) ``` @@ -72,7 +72,7 @@ outside world, you can bind to `127.0.0.1` instead of the public interface, usin ```bash docker run -d --name timescaledb -p 127.0.0.1:5432:5432 \ --v :/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg17 +-v :/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg18 ``` If you don't want to install `psql` and other $PG client tools locally, @@ -111,7 +111,7 @@ information, see the [Docker documentation on logs][docker-logs]. To install the latest release based on $PG 17: ``` - docker pull timescale/timescaledb:latest-pg17 + docker pull timescale/timescaledb:latest-pg18 ``` $TIMESCALE_DB is pre-created in the default $PG database and added by default to any new database you create in this image. @@ -121,7 +121,7 @@ information, see the [Docker documentation on logs][docker-logs]. ``` docker run -v :/pgdata -e PGDATA=/pgdata \ - -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg17 + -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg18 ``` If you are running multiple container instances, change the port each Docker instance runs on. @@ -167,7 +167,7 @@ outside world, you can bind to `127.0.0.1` instead of the public interface, usin ```bash docker run -v :/pgdata -e PGDATA=/pgdata \ -d --name timescaledb -p 127.0.0.1:5432:5432 \ - -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg17 + -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg18 ``` If you don't want to install `psql` and other $PG client tools locally, @@ -191,7 +191,7 @@ data volume using the `-v` flag: ```bash docker run -d --name timescaledb -p 5432:5432 \ -v :/pgdata -e PGDATA=/pgdata \ --e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg17 +-e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg18 ``` When you install $TIMESCALE_DB using a Docker container, the $PG settings diff --git a/_partials/_kubernetes-install-self-hosted.md b/_partials/_kubernetes-install-self-hosted.md index 982098823e..e81c6d5bac 100644 --- a/_partials/_kubernetes-install-self-hosted.md +++ b/_partials/_kubernetes-install-self-hosted.md @@ -63,7 +63,7 @@ To connect your Kubernetes cluster to $SELF_LONG running in the cluster: spec: containers: - name: timescaledb - image: 'timescale/timescaledb:latest-pg17' + image: 'timescale/timescaledb:latest-pg18' env: - name: POSTGRES_USER value: postgres @@ -143,9 +143,9 @@ To connect your Kubernetes cluster to $SELF_LONG running in the cluster: ``` 1. **Test the database connection** - + 1. Create and run a pod to verify database connectivity using your [connection details][connection-info] saved in `timescale-secret`: - + ```shell kubectl run test-pod --image=postgres --restart=Never \ --env="PGHOST=$(kubectl get secret timescale-secret -o=jsonpath='{.data.PGHOST}' | base64 --decode)" \ diff --git a/_partials/_start-coding-ruby.md b/_partials/_start-coding-ruby.md index 2b4aa5e527..02874c21e0 100644 --- a/_partials/_start-coding-ruby.md +++ b/_partials/_start-coding-ruby.md @@ -86,13 +86,13 @@ from a standard Rails app configured for $PG. The result shows the list of extensions in your $SERVICE_LONG | Name | Version | Schema | Description | - | -- | -- | -- | -- | + | -- |---------| -- | -- | | pg_buffercache | 1.5 | public | examine the shared buffer cache| | pg_stat_statements | 1.11 | public | track planning and execution statistics of all SQL statements executed| | plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language| | postgres_fdw | 1.1 | public | foreign-data wrapper for remote $PG servers| - | timescaledb | 2.18.1 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)| - | timescaledb_toolkit | 1.19.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities| + | timescaledb | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)| + | timescaledb_toolkit | 1.22.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities| diff --git a/self-hosted/configuration/configuration.md b/self-hosted/configuration/configuration.md index bd1b1c8d7b..baf1e308b0 100644 --- a/self-hosted/configuration/configuration.md +++ b/self-hosted/configuration/configuration.md @@ -338,7 +338,7 @@ Alternatively, one or more parameters can be passed in to the `docker run` command via a `-c` option, as in the following. ```bash -docker run -i -t timescale/timescaledb:latest-pg10 postgres -cmax_wal_size=2GB +docker run -i -t timescale/timescaledb:latest-pg18 postgres -cmax_wal_size=2GB ``` Additional examples of passing in arguments at boot can be found in our diff --git a/self-hosted/configuration/docker-config.md b/self-hosted/configuration/docker-config.md index 64ed2d23ba..9fa4fda07f 100644 --- a/self-hosted/configuration/docker-config.md +++ b/self-hosted/configuration/docker-config.md @@ -56,7 +56,7 @@ set parameters directly from the command prompt inside your Docker container, using the `-c` option. For example: ```bash -docker run -i -t timescale/timescaledb:latest-pg10 postgres -c max_wal_size=2GB +docker run -i -t timescale/timescaledb:latest-pg18 postgres -c max_wal_size=2GB ``` [docker]: /self-hosted/:currentVersion:/install/installation-docker/ diff --git a/self-hosted/tooling/install-toolkit.md b/self-hosted/tooling/install-toolkit.md index d521f60833..09bba16fc4 100644 --- a/self-hosted/tooling/install-toolkit.md +++ b/self-hosted/tooling/install-toolkit.md @@ -40,7 +40,7 @@ Best practice for $TOOLKIT_SHORT installation is to use the To get $TOOLKIT_SHORT, use the high availability image, `timescaledb-ha`: ```bash -docker pull timescale/timescaledb-ha:pg17 +docker pull timescale/timescaledb-ha:pg18 ``` The $TOOLKIT_SHORT extension is pre-installed and pre-enabled in the `timescaledb-ha` image. Once you start the container, the extension is already active in your database and ready to use. No additional installation steps are required. diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index 987e18b47a..6619ec8d73 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -7,13 +7,13 @@ keywords: [uninstall] # Uninstall TimescaleDB -You can uninstall TimescaleDB without uninstalling Postgres. Choose your platform below. +You can uninstall $TIMESCALE_DB without uninstalling $PG. Choose your platform below. -If you installed TimescaleDB using Docker, you can completely remove the TimescaleDB container, image, and optionally the data volumes. +If you installed $TIMESCALE_DB using Docker, you can completely remove the $TIMESCALE_DB container, image, and optionally the data volumes. @@ -35,25 +35,40 @@ If you installed TimescaleDB using Docker, you can completely remove the Timesca 1. **List and remove the Docker image** - 1. See which TimescaleDB images you have installed: + 1. See which $TIMESCALE_DB images you have installed: ```bash docker images | grep timescale ``` - - 1. Remove the specific TimescaleDB image: - + You see something like: ```bash - # For TimescaleDB-HA - docker rmi timescale/timescaledb-ha:pg17 - - # For TimescaleDB light - docker rmi timescale/timescaledb:latest-pg17 + timescale/timescaledb-ha pg18 1ec79f20f47d 9 hours ago 6.2GB ``` - Replace `pg17` with your Postgres version if different. - -1. **(Optional) Remove the data volume** + 1. Remove the $TIMESCALE_DB image: + + + + + + ```bash + docker rmi timescale/timescaledb-ha:pg18 + ``` + + + + + ```bash + docker rmi timescale/timescaledb:latest-pg18 + ``` + + + + + + Replace `pg18` with your $PG version. + +1. **(Optional) Remove the data** @@ -85,63 +100,48 @@ If you installed TimescaleDB using Docker, you can completely remove the Timesca -If you deployed TimescaleDB on Kubernetes, you can completely remove all associated resources including the StatefulSet, Service, PersistentVolumeClaim, Secret, and application deployments. +If you deployed $TIMESCALE_DB on Kubernetes, you can completely remove all associated resources including the StatefulSet, Service, PersistentVolumeClaim, Secret, and application deployments. -1. **Back up your data (optional but recommended)** - - Before uninstalling, back up any important data from your TimescaleDB instance: +1. **Back up any important data from your $TIMESCALE_DB instance**~~~~ ```shell kubectl exec -it timescaledb-0 -- pg_dump -U postgres postgres > backup.sql ``` - - - Deleting the PersistentVolumeClaim will permanently delete all your database data. Ensure you have backed up any data you need before proceeding. - - - -1. **Delete the test pod, if it exists** - - If you created a test pod during installation: +1. **If you created a test pod during installation, delete it** ```shell kubectl delete pod test-pod ``` -1. **Delete the application deployment** - - Remove any application deployments that connect to TimescaleDB: +1. **Remove any application deployments that connect to $TIMESCALE_DB** ```shell kubectl delete deployment timescale-app ``` -1. **Delete the TimescaleDB service** - - Remove the service that exposes TimescaleDB within the cluster: +1. **Remove the service that exposes $TIMESCALE_DB within the cluster** ```shell kubectl delete service timescaledb ``` -1. **Delete the TimescaleDB StatefulSet** - - Remove the StatefulSet managing the TimescaleDB pods: +1. **Delete the StatefulSet managing the $TIMESCALE_DB pods** ```shell kubectl delete statefulset timescaledb ``` - - This terminates the TimescaleDB pod. + + This terminates the $TIMESCALE_DB pod. 1. **Delete the PersistentVolumeClaim** - This step permanently deletes all database data stored in the persistent volume. + Deleting the PersistentVolumeClaim permanently deletes all your database data. Ensure you have backed up any data + you need before proceeding. @@ -149,9 +149,7 @@ If you deployed TimescaleDB on Kubernetes, you can completely remove all associa kubectl delete pvc timescale-pvc ``` -1. **Delete the secret** - - Remove the Kubernetes secret containing database credentials: +1. **Remove the Kubernetes secret containing database credentials** ```shell kubectl delete secret timescale-secret @@ -159,7 +157,7 @@ If you deployed TimescaleDB on Kubernetes, you can completely remove all associa 1. **(Optional) Delete the namespace** - If you created a dedicated namespace for TimescaleDB, you can remove it as well. + If you created a dedicated namespace for $TIMESCALE_DB, you can remove it as well. @@ -186,9 +184,9 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - 1. Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where $TIMESCALE_DB is enabled and remove the extension: ```bash sudo -u postgres psql -d @@ -200,17 +198,17 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; ``` - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + Using `CASCADE` will drop all $TIMESCALE_DB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. -1. **Remove TimescaleDB from `shared_preload_libraries`** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - Edit the Postgres configuration file: + Edit the $PG configuration file: ```bash sudo nano /etc/postgresql/17/main/postgresql.conf @@ -230,21 +228,21 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. -1. **Restart Postgres** +1. **Restart $PG** ```bash sudo systemctl restart postgresql ``` -1. **Uninstall the TimescaleDB package** +1. **Uninstall the $TIMESCALE_DB package** ```bash sudo apt remove timescaledb-2-postgresql-17 ``` - Replace `17` with your Postgres version if different. + Replace `17` with your $PG version if different. -1. **Remove the TimescaleDB repository configuration** +1. **Remove the $TIMESCALE_DB repository configuration** ```bash sudo rm /etc/apt/sources.list.d/timescaledb.list @@ -254,7 +252,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Remove dependencies** - Remove unused dependencies installed with TimescaleDB: + Remove unused dependencies installed with $TIMESCALE_DB: @@ -274,9 +272,9 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - 1. Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where $TIMESCALE_DB is enabled and remove the extension: ```bash sudo -u postgres psql -d @@ -288,17 +286,17 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; ``` - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + Using `CASCADE` will drop all $TIMESCALE_DB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. -1. **Remove TimescaleDB from `shared_preload_libraries`** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - Edit the Postgres configuration file: + Edit the $PG configuration file: ```bash sudo nano /etc/postgresql/17/main/postgresql.conf @@ -318,21 +316,21 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. -1. **Restart Postgres** +1. **Restart $PG** ```bash sudo systemctl restart postgresql ``` -1. **Uninstall the TimescaleDB package** +1. **Uninstall the $TIMESCALE_DB package** ```bash sudo apt remove timescaledb-2-postgresql-17 ``` - Replace `17` with your Postgres version if different. + Replace `17` with your $PG version if different. -1. **Remove the TimescaleDB repository configuration** +1. **Remove the $TIMESCALE_DB repository configuration** ```bash sudo rm /etc/apt/sources.list.d/timescaledb.list @@ -342,7 +340,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Remove dependencies** - Remove unused dependencies installed with TimescaleDB: + Remove unused dependencies installed with $TIMESCALE_DB: @@ -362,9 +360,9 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - 1. Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where $TIMESCALE_DB is enabled and remove the extension: ```bash sudo -u postgres psql -d @@ -376,17 +374,17 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; ``` - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + Using `CASCADE` will drop all $TIMESCALE_DB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. -1. **Remove TimescaleDB from `shared_preload_libraries`** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - Edit the Postgres configuration file: + Edit the $PG configuration file: ```bash sudo vi /var/lib/pgsql/17/data/postgresql.conf @@ -406,23 +404,23 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. Press `Esc`, then type `:wq` and press Enter to save. -1. **Restart Postgres** +1. **Restart $PG** ```bash sudo systemctl restart postgresql-17 ``` - Replace `17` with your Postgres version if different. + Replace `17` with your $PG version if different. -1. **Uninstall the TimescaleDB package** +1. **Uninstall the $TIMESCALE_DB package** ```bash sudo dnf remove timescaledb-2-postgresql-17 ``` - Replace `17` with your Postgres version if different. + Replace `17` with your $PG version if different. -1. **Remove the TimescaleDB repository configuration** +1. **Remove the $TIMESCALE_DB repository configuration** ```bash sudo rm /etc/yum.repos.d/timescale_timescaledb.repo @@ -430,7 +428,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Remove dependencies** - Remove unused dependencies installed with TimescaleDB: + Remove unused dependencies installed with $TIMESCALE_DB: @@ -450,9 +448,9 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - 1. Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where $TIMESCALE_DB is enabled and remove the extension: ```bash sudo -u postgres psql -d @@ -464,17 +462,17 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; ``` - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + Using `CASCADE` will drop all $TIMESCALE_DB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. -1. **Remove TimescaleDB from `shared_preload_libraries`** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - Edit the Postgres configuration file: + Edit the $PG configuration file: ```bash sudo vi /var/lib/pgsql/17/data/postgresql.conf @@ -494,23 +492,23 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. -1. **Restart Postgres** +1. **Restart $PG** ```bash sudo systemctl restart postgresql-17 ``` - Replace `17` with your Postgres version if different. + Replace `17` with your $PG version if different. -1. **Uninstall the TimescaleDB package** +1. **Uninstall the $TIMESCALE_DB package** ```bash sudo dnf remove timescaledb-2-postgresql-17 ``` - Replace `17` with your Postgres version if different. + Replace `17` with your $PG version if different. -1. **Remove the TimescaleDB repository configuration** +1. **Remove the $TIMESCALE_DB repository configuration** ```bash sudo rm /etc/yum.repos.d/timescale_timescaledb.repo @@ -518,7 +516,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Remove dependencies** - Remove unused dependencies installed with TimescaleDB: + Remove unused dependencies installed with $TIMESCALE_DB: @@ -538,9 +536,9 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - 1. Connect to each database where TimescaleDB is enabled and remove the extension: + 1. Connect to each database where $TIMESCALE_DB is enabled and remove the extension: ```bash sudo -u postgres psql -d @@ -552,17 +550,17 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; ``` - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + Using `CASCADE` will drop all $TIMESCALE_DB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. -1. **Remove TimescaleDB from `shared_preload_libraries`** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - Edit the Postgres configuration file: + Edit the $PG configuration file: ```bash sudo vi /var/lib/pgsql/17/data/postgresql.conf @@ -582,23 +580,23 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: If there are other extensions in the list, keep them and only remove `timescaledb`. Press `Esc`, then type `:wq` and press Enter to save. -1. **Restart Postgres** +1. **Restart $PG** ```bash sudo systemctl restart postgresql-17 ``` - Replace `17` with your Postgres version if different. + Replace `17` with your $PG version if different. -1. **Uninstall the TimescaleDB package** +1. **Uninstall the $TIMESCALE_DB package** ```bash sudo dnf remove timescaledb-2-postgresql-17 ``` - Replace `17` with your Postgres version if different. + Replace `17` with your $PG version if different. -1. **Remove the TimescaleDB repository configuration** +1. **Remove the $TIMESCALE_DB repository configuration** ```bash sudo rm /etc/yum.repos.d/timescale_timescaledb.repo @@ -606,7 +604,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Remove dependencies** - Remove unused dependencies installed with TimescaleDB: + Remove unused dependencies installed with $TIMESCALE_DB: @@ -636,15 +634,15 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - At the `psql` prompt, remove the TimescaleDB extension: + At the `psql` prompt, remove the $TIMESCALE_DB extension: ```sql DROP EXTENSION timescaledb; ``` -1. **Remove TimescaleDB from `shared_preload_libraries`** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** At the command prompt, remove `timescaledb` from `shared_preload_libraries` in the `postgresql.conf` configuration file: @@ -655,13 +653,13 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. 1. **Save the changes to the `postgresql.conf` file** -1. **Restart Postgres** +1. **Restart $PG** ```bash brew services restart postgresql ``` -1. **Uninstall TimescaleDB** +1. **Uninstall $TIMESCALE_DB** ```bash brew uninstall timescaledb @@ -681,15 +679,15 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - At the `psql` prompt, remove the TimescaleDB extension: + At the `psql` prompt, remove the $TIMESCALE_DB extension: ```sql DROP EXTENSION timescaledb; ``` -1. **Remove TimescaleDB from `shared_preload_libraries`** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** At the command prompt, remove `timescaledb` from `shared_preload_libraries` in the `postgresql.conf` configuration file: @@ -699,13 +697,13 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. ``` 1. **Save the changes to the `postgresql.conf` file** -1. **Restart Postgres** +1. **Restart $PG** ```bash port reload postgresql ``` -1. **Uninstall TimescaleDB and the related dependencies** +1. **Uninstall $TIMESCALE_DB and the related dependencies** ```bash port uninstall timescaledb --follow-dependencies @@ -721,13 +719,13 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. -If you installed TimescaleDB by building from source, you can uninstall it without removing Postgres. +If you installed $TIMESCALE_DB by building from source, you can uninstall it without removing $PG. -1. **Drop the TimescaleDB extension from your databases** +1. **Drop the $TIMESCALE_DB extension from your databases** - Connect to each database where TimescaleDB is enabled and remove the extension: + Connect to each database where $TIMESCALE_DB is enabled and remove the extension: @@ -763,17 +761,17 @@ If you installed TimescaleDB by building from source, you can uninstall it witho DROP EXTENSION IF EXISTS timescaledb CASCADE; ``` - Repeat this for all databases with TimescaleDB enabled. To exit psql, type `\q`. + Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. - Using `CASCADE` will drop all TimescaleDB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. + Using `CASCADE` will drop all $TIMESCALE_DB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. -1. **Remove TimescaleDB from `shared_preload_libraries`** +1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - Locate your Postgres configuration file: + Locate your $PG configuration file: @@ -850,7 +848,7 @@ If you installed TimescaleDB by building from source, you can uninstall it witho Save the file. -1. **Restart Postgres** +1. **Restart $PG** @@ -892,11 +890,11 @@ If you installed TimescaleDB by building from source, you can uninstall it witho -1. **Remove TimescaleDB binaries** +1. **Remove $TIMESCALE_DB binaries** - Manually remove the TimescaleDB files from your Postgres installation directory. + Manually remove the $TIMESCALE_DB files from your $PG installation directory. - Find your Postgres library directory: + Find your $PG library directory: @@ -926,7 +924,7 @@ If you installed TimescaleDB by building from source, you can uninstall it witho - Remove TimescaleDB library files: + Remove $TIMESCALE_DB library files: @@ -966,7 +964,7 @@ If you installed TimescaleDB by building from source, you can uninstall it witho - Find your Postgres extension directory: + Find your $PG extension directory: @@ -996,7 +994,7 @@ If you installed TimescaleDB by building from source, you can uninstall it witho - Remove TimescaleDB extension files: + Remove $TIMESCALE_DB extension files: @@ -1028,7 +1026,7 @@ If you installed TimescaleDB by building from source, you can uninstall it witho -1. **(Optional) Remove the TimescaleDB source directory** +1. **(Optional) Remove the $TIMESCALE_DB source directory** If you no longer need the source code: diff --git a/self-hosted/upgrades/upgrade-docker.md b/self-hosted/upgrades/upgrade-docker.md index 2309af201c..b6b1609fbf 100644 --- a/self-hosted/upgrades/upgrade-docker.md +++ b/self-hosted/upgrades/upgrade-docker.md @@ -96,7 +96,7 @@ data. This command pulls the latest version of $TIMESCALE_DB running on $PG 17: ``` - docker pull timescale/timescaledb-ha:pg17 + docker pull timescale/timescaledb-ha:pg18 ``` If you're using another version of $PG, look for the relevant tag in the [$TIMESCALE_DB HA](https://hub.docker.com/r/timescale/timescaledb-ha/tags) repository on Docker Hub. @@ -118,7 +118,7 @@ data. ```bash docker run -v :/pgdata -e PGDATA=/pgdata - -d --name timescaledb -p 5432:5432 timescale/timescaledb-ha:pg17 + -d --name timescaledb -p 5432:5432 timescale/timescaledb-ha:pg18 ``` @@ -127,7 +127,7 @@ data. ```bash docker run -v :/pgdata -e PGDATA=/pgdata -d --name timescaledb \ - -p 5432:5432 timescale/timescaledb-ha:pg17 + -p 5432:5432 timescale/timescaledb-ha:pg18 ``` @@ -171,7 +171,7 @@ If you have multiple databases, update each database separately. This command pulls the latest version of $TIMESCALE_DB running on $PG 17. ``` - docker pull timescale/timescaledb:latest-pg17 + docker pull timescale/timescaledb:latest-pg18 ``` If you're using another version of $PG, look for the relevant tag in the [TimescaleDB light](https://hub.docker.com/r/timescale/timescaledb) repository on Docker Hub. @@ -193,7 +193,7 @@ If you have multiple databases, update each database separately. ```bash docker run -v :/pgdata -e PGDATA=/pgdata \ - -d --name timescaledb -p 5432:5432 timescale/timescaledb:latest-pg17 + -d --name timescaledb -p 5432:5432 timescale/timescaledb:latest-pg18 ``` @@ -202,7 +202,7 @@ If you have multiple databases, update each database separately. ```bash docker run -v :/pgdata -e PGDATA=/pgdata -d --name timescaledb \ - -p 5432:5432 timescale/timescaledb:latest-pg17 + -p 5432:5432 timescale/timescaledb:latest-pg18 ``` diff --git a/use-timescale/extensions/pgcrypto.md b/use-timescale/extensions/pgcrypto.md index b96d13e061..1818da3af4 100644 --- a/use-timescale/extensions/pgcrypto.md +++ b/use-timescale/extensions/pgcrypto.md @@ -45,8 +45,8 @@ precious your data is and safeguards sensitive information. pg_stat_statements | 1.10 | public | track planning and execution statistics of all SQL statements executed pgcrypto | 1.3 | public | cryptographic functions plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - timescaledb | 2.11.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) - timescaledb_toolkit | 1.16.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities + timescaledb | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) + timescaledb_toolkit | 1.22.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities ``` 1. Create a table named `user_passwords`: diff --git a/use-timescale/extensions/postgis.md b/use-timescale/extensions/postgis.md index ac7afa866f..2559d9d6d9 100644 --- a/use-timescale/extensions/postgis.md +++ b/use-timescale/extensions/postgis.md @@ -47,8 +47,8 @@ particular location. pgcrypto | 1.3 | public | cryptographic functions plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language postgis | 3.3.3 | public | PostGIS geometry and geography spatial types and functions - timescaledb | 2.11.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) - timescaledb_toolkit | 1.16.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities + timescaledb | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) + timescaledb_toolkit | 1.22.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities (6 rows) ``` From 4cc539a1616de7e16e238cd76955dc9cb2fe14ba Mon Sep 17 00:00:00 2001 From: billy-the-fish Date: Tue, 16 Dec 2025 18:41:00 +0100 Subject: [PATCH 10/15] chore: docker and kubernetes check. --- self-hosted/uninstall.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index 6619ec8d73..c956434fd1 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -37,13 +37,13 @@ If you installed $TIMESCALE_DB using Docker, you can completely remove the $TIME 1. See which $TIMESCALE_DB images you have installed: - ```bash - docker images | grep timescale - ``` - You see something like: - ```bash - timescale/timescaledb-ha pg18 1ec79f20f47d 9 hours ago 6.2GB - ``` + ```bash + docker images | grep timescale + ``` + You see something like: + ```bash + timescale/timescaledb-ha pg18 1ec79f20f47d 9 hours ago 6.2GB + ``` 1. Remove the $TIMESCALE_DB image: From 1cd446062253e58e7be9a2d57615778782434158 Mon Sep 17 00:00:00 2001 From: billy-the-fish Date: Wed, 17 Dec 2025 13:47:54 +0100 Subject: [PATCH 11/15] chore: all linux. --- _partials/_add-timescaledb-to-a-database.md | 13 ++-- .../_install-self-hosted-debian-based-end.md | 2 +- .../_install-self-hosted-debian-based.md | 2 +- .../_install-self-hosted-redhat-based.md | 10 +-- .../_install-self-hosted-redhat-rocky.md | 10 +-- .../_install-self-hosted-redhat-x-platform.md | 10 +-- _partials/_install-self-hosted-ubuntu.md | 9 ++- .../_toolkit-install-update-debian-base.md | 4 +- .../_toolkit-install-update-redhat-base.md | 4 +- self-hosted/install/installation-linux.md | 5 +- self-hosted/install/installation-windows.md | 5 +- self-hosted/uninstall.md | 70 +++++++++---------- 12 files changed, 73 insertions(+), 71 deletions(-) diff --git a/_partials/_add-timescaledb-to-a-database.md b/_partials/_add-timescaledb-to-a-database.md index fb45d1ea13..077b21bc23 100644 --- a/_partials/_add-timescaledb-to-a-database.md +++ b/_partials/_add-timescaledb-to-a-database.md @@ -24,12 +24,13 @@ You see the list of installed extensions: ```sql - List of installed extensions - Name | Version | Schema | Description - -------------+---------+------------+--------------------------------------------------------------------------------------- - plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - timescaledb | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) + List of installed extensions + Name | Version | Default version | Schema | Description + -------------+---------+-----------------+------------+--------------------------------------------------------------------------------------- + plpgsql | 1.0 | 1.0 | pg_catalog | PL/pgSQL procedural language + timescaledb | 2.24.0 | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) + (2 rows) ``` - Press q to exit the list of extensions. + Press `\q` to exit the list of extensions. diff --git a/_partials/_install-self-hosted-debian-based-end.md b/_partials/_install-self-hosted-debian-based-end.md index a1dd1bcdee..e5decbec2a 100644 --- a/_partials/_install-self-hosted-debian-based-end.md +++ b/_partials/_install-self-hosted-debian-based-end.md @@ -8,7 +8,7 @@ 1. **Install TimescaleDB** ```bash - sudo apt install timescaledb-2-postgresql-17 postgresql-client-17 + sudo apt install timescaledb-2-postgresql-18 postgresql-client-18 ``` To install a specific $TIMESCALE_DB [release][releases-page], set the version. For example: diff --git a/_partials/_install-self-hosted-debian-based.md b/_partials/_install-self-hosted-debian-based.md index 9230cb8838..e47767d29e 100644 --- a/_partials/_install-self-hosted-debian-based.md +++ b/_partials/_install-self-hosted-debian-based.md @@ -58,7 +58,7 @@ 1. **Install TimescaleDB** ```bash - sudo apt install timescaledb-2-postgresql-17 postgresql-client-17 + sudo apt install timescaledb-2-postgresql-18 postgresql-client-18 ``` To install a specific $TIMESCALE_DB [release][releases-page], set the version. For example: diff --git a/_partials/_install-self-hosted-redhat-based.md b/_partials/_install-self-hosted-redhat-based.md index 5be6f58546..a7fb8dbb8d 100644 --- a/_partials/_install-self-hosted-redhat-based.md +++ b/_partials/_install-self-hosted-redhat-based.md @@ -75,7 +75,7 @@ To avoid errors, **do not** install $TDB_APACHE and $TDB_COMMUNITY at the same time. ```bash - sudo yum install timescaledb-2-postgresql-17 postgresql17 + sudo yum install timescaledb-2-postgresql-18 postgresql18 ``` @@ -92,13 +92,13 @@ 1. **Initialize the $PG instance** ```bash - sudo /usr/pgsql-17/bin/postgresql-17-setup initdb + sudo /usr/pgsql-18/bin/postgresql-18-setup initdb ``` 1. **Tune your $PG instance for TimescaleDB** ```bash - sudo timescaledb-tune --pg-config=/usr/pgsql-17/bin/pg_config + sudo timescaledb-tune --pg-config=/usr/pgsql-18/bin/pg_config ``` This script is included with the `timescaledb-tools` package when you install TimescaleDB. @@ -107,8 +107,8 @@ 1. **Enable and start $PG** ```bash - sudo systemctl enable postgresql-17 - sudo systemctl start postgresql-17 + sudo systemctl enable postgresql-18 + sudo systemctl start postgresql-18 ``` 1. **Log in to $PG as `postgres`** diff --git a/_partials/_install-self-hosted-redhat-rocky.md b/_partials/_install-self-hosted-redhat-rocky.md index d23018a98d..b185c89fef 100644 --- a/_partials/_install-self-hosted-redhat-rocky.md +++ b/_partials/_install-self-hosted-redhat-rocky.md @@ -4,19 +4,19 @@ To avoid errors, **do not** install $TDB_APACHE and $TDB_COMMUNITY at the same time. ```bash - sudo dnf install -y postgresql16-server postgresql16-contrib timescaledb-2-postgresql-16 + sudo dnf install -y postgresql18-server postgresql18-contrib timescaledb-2-postgresql-18 ``` 1. **Initialize the $PG instance** ```bash - sudo /usr/pgsql-16/bin/postgresql-16-setup initdb + sudo /usr/pgsql-18/bin/postgresql-18-setup initdb ``` 1. **Tune your $PG instance for TimescaleDB** ```bash - sudo timescaledb-tune --pg-config=/usr/pgsql-16/bin/pg_config + sudo timescaledb-tune --pg-config=/usr/pgsql-18/bin/pg_config ``` This script is included with the `timescaledb-tools` package when you install TimescaleDB. @@ -25,8 +25,8 @@ 1. **Enable and start $PG** ```bash - sudo systemctl enable postgresql-16 - sudo systemctl start postgresql-16 + sudo systemctl enable postgresql-18 + sudo systemctl start postgresql-18 ``` 1. **Log in to $PG as `postgres`** diff --git a/_partials/_install-self-hosted-redhat-x-platform.md b/_partials/_install-self-hosted-redhat-x-platform.md index 6143ecbac4..50757c5941 100644 --- a/_partials/_install-self-hosted-redhat-x-platform.md +++ b/_partials/_install-self-hosted-redhat-x-platform.md @@ -10,7 +10,7 @@ To avoid errors, **do not** install $TDB_APACHE and $TDB_COMMUNITY at the same time. ```bash - sudo yum install timescaledb-2-postgresql-17 postgresql17 + sudo yum install timescaledb-2-postgresql-18 postgresql18 ``` @@ -27,13 +27,13 @@ 1. **Initialize the $PG instance** ```bash - sudo /usr/pgsql-17/bin/postgresql-17-setup initdb + sudo /usr/pgsql-18/bin/postgresql-18-setup initdb ``` 1. **Tune your $PG instance for TimescaleDB** ```bash - sudo timescaledb-tune --pg-config=/usr/pgsql-17/bin/pg_config + sudo timescaledb-tune --pg-config=/usr/pgsql-18/bin/pg_config ``` This script is included with the `timescaledb-tools` package when you install TimescaleDB. @@ -42,8 +42,8 @@ 1. **Enable and start $PG** ```bash - sudo systemctl enable postgresql-17 - sudo systemctl start postgresql-17 + sudo systemctl enable postgresql-18 + sudo systemctl start postgresql-18 ``` 1. **Log in to $PG as `postgres`** diff --git a/_partials/_install-self-hosted-ubuntu.md b/_partials/_install-self-hosted-ubuntu.md index 904c609cf0..e3730e868d 100644 --- a/_partials/_install-self-hosted-ubuntu.md +++ b/_partials/_install-self-hosted-ubuntu.md @@ -5,6 +5,8 @@ import SelfHostedDebianEnd from "versionContent/_partials/_install-self-hosted-d +1. **Add the $TIMESCALE_DB package** + ```bash echo "deb https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list ``` @@ -14,10 +16,11 @@ import SelfHostedDebianEnd from "versionContent/_partials/_install-self-hosted-d ```bash wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg ``` - - For Ubuntu 21.10 and earlier use the following command: - `wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -` + For Ubuntu 21.10 and earlier use the following command: + ```bash + wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add - + ``` diff --git a/_partials/_toolkit-install-update-debian-base.md b/_partials/_toolkit-install-update-debian-base.md index ebdaa0e561..ef90663568 100644 --- a/_partials/_toolkit-install-update-debian-base.md +++ b/_partials/_toolkit-install-update-debian-base.md @@ -20,7 +20,7 @@ These instructions use the `apt` package manager. 1. Install TimescaleDB Toolkit: ```bash - sudo apt install timescaledb-toolkit-postgresql-17 + sudo apt install timescaledb-toolkit-postgresql-18 ``` 1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. @@ -47,7 +47,7 @@ Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENS 1. Install the latest version of $TOOLKIT_LONG: ```bash - apt install timescaledb-toolkit-postgresql-17 + apt install timescaledb-toolkit-postgresql-18 ``` 1. [Connect to the database][connect] where you want to use the new version of $TOOLKIT_SHORT. diff --git a/_partials/_toolkit-install-update-redhat-base.md b/_partials/_toolkit-install-update-redhat-base.md index 7c938c4b81..fc3e1088ee 100644 --- a/_partials/_toolkit-install-update-redhat-base.md +++ b/_partials/_toolkit-install-update-redhat-base.md @@ -26,7 +26,7 @@ These instructions use the `yum` package manager. 1. Install $TOOLKIT_LONG: ```bash - yum install timescaledb-toolkit-postgresql-17 + yum install timescaledb-toolkit-postgresql-18 ``` 1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. @@ -53,7 +53,7 @@ Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENS 1. Install the latest version of $TOOLKIT_LONG: ```bash - yum install timescaledb-toolkit-postgresql-17 + yum install timescaledb-toolkit-postgresql-18 ``` 1. [Connect to the database][connect] where you want to use the new version of $TOOLKIT_SHORT. diff --git a/self-hosted/install/installation-linux.md b/self-hosted/install/installation-linux.md index d783b5fa8d..befcdb6ce0 100644 --- a/self-hosted/install/installation-linux.md +++ b/self-hosted/install/installation-linux.md @@ -39,9 +39,8 @@ $TIMESCALE_DB on a [supported platform][supported-platforms-link] using the pack -If you have previously installed $PG without a package manager, you may encounter errors -following these install instructions. Best practice is to fully remove any existing $PG -installations before you begin. +If you have previously installed $PG, you may encounter errors following these install instructions. Best +practice is to fully remove any existing $PG installations before you begin. To keep your current $PG installation, [Install from source][install-from-source]. diff --git a/self-hosted/install/installation-windows.md b/self-hosted/install/installation-windows.md index ddecb0230b..ecadd48e6f 100644 --- a/self-hosted/install/installation-windows.md +++ b/self-hosted/install/installation-windows.md @@ -42,9 +42,8 @@ $TIMESCALE_DB on a [supported platform][supported-platforms] using the packages -If you have previously installed $PG without a package manager, you may encounter errors -following these install instructions. Best practice is to full remove any existing $PG -installations before you begin. +If you have previously installed $PG, you may encounter errors following these install instructions. +Best practice is to full remove any existing $PG installations before you begin. To keep your current $PG installation, [Install from source][install-from-source]. diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index c956434fd1..ae8e0a0d7d 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -195,7 +195,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. At the `psql` prompt: ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + DROP EXTENSION timescaledb CASCADE; ``` Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. @@ -211,7 +211,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: Edit the $PG configuration file: ```bash - sudo nano /etc/postgresql/17/main/postgresql.conf + sudo vi /etc/postgresql/18/main/postgresql.conf ``` Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: @@ -237,10 +237,10 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Uninstall the $TIMESCALE_DB package** ```bash - sudo apt remove timescaledb-2-postgresql-17 + sudo apt remove timescaledb-2-postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Remove the $TIMESCALE_DB repository configuration** @@ -283,7 +283,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. At the `psql` prompt: ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + DROP EXTENSION timescaledb CASCADE; ``` Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. @@ -299,7 +299,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: Edit the $PG configuration file: ```bash - sudo nano /etc/postgresql/17/main/postgresql.conf + sudo vi /etc/postgresql/18/main/postgresql.conf ``` Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: @@ -325,10 +325,10 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Uninstall the $TIMESCALE_DB package** ```bash - sudo apt remove timescaledb-2-postgresql-17 + sudo apt remove timescaledb-2-postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Remove the $TIMESCALE_DB repository configuration** @@ -371,7 +371,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. At the `psql` prompt: ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + DROP EXTENSION timescaledb CASCADE; ``` Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. @@ -387,7 +387,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: Edit the $PG configuration file: ```bash - sudo vi /var/lib/pgsql/17/data/postgresql.conf + sudo vi /var/lib/pgsql/18/data/postgresql.conf ``` Press `/` to search, type `shared_preload_libraries`, and press Enter. Press `i` to edit. Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: @@ -407,18 +407,18 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Restart $PG** ```bash - sudo systemctl restart postgresql-17 + sudo systemctl restart postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Uninstall the $TIMESCALE_DB package** ```bash - sudo dnf remove timescaledb-2-postgresql-17 + sudo dnf remove timescaledb-2-postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Remove the $TIMESCALE_DB repository configuration** @@ -459,7 +459,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. At the `psql` prompt: ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + DROP EXTENSION timescaledb CASCADE; ``` Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. @@ -475,7 +475,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: Edit the $PG configuration file: ```bash - sudo vi /var/lib/pgsql/17/data/postgresql.conf + sudo vi /var/lib/pgsql/18/data/postgresql.conf ``` Press `/` to search, type `shared_preload_libraries`, and press Enter. Press `i` to edit. Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: @@ -495,18 +495,18 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Restart $PG** ```bash - sudo systemctl restart postgresql-17 + sudo systemctl restart postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Uninstall the $TIMESCALE_DB package** ```bash - sudo dnf remove timescaledb-2-postgresql-17 + sudo dnf remove timescaledb-2-postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Remove the $TIMESCALE_DB repository configuration** @@ -547,7 +547,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. At the `psql` prompt: ```sql - DROP EXTENSION IF NOT EXISTS timescaledb CASCADE; + DROP EXTENSION timescaledb CASCADE; ``` Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. @@ -563,7 +563,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: Edit the $PG configuration file: ```bash - sudo vi /var/lib/pgsql/17/data/postgresql.conf + sudo vi /var/lib/pgsql/18/data/postgresql.conf ``` Press `/` to search, type `shared_preload_libraries`, and press Enter. Press `i` to edit. Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: @@ -583,18 +583,18 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: 1. **Restart $PG** ```bash - sudo systemctl restart postgresql-17 + sudo systemctl restart postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Uninstall the $TIMESCALE_DB package** ```bash - sudo dnf remove timescaledb-2-postgresql-17 + sudo dnf remove timescaledb-2-postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Remove the $TIMESCALE_DB repository configuration** @@ -639,7 +639,7 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. At the `psql` prompt, remove the $TIMESCALE_DB extension: ```sql - DROP EXTENSION timescaledb; + DROP EXTENSION timescaledb CASCADE; ``` 1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** @@ -684,7 +684,7 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. At the `psql` prompt, remove the $TIMESCALE_DB extension: ```sql - DROP EXTENSION timescaledb; + DROP EXTENSION timescaledb CASCADE; ``` 1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** @@ -758,7 +758,7 @@ If you installed $TIMESCALE_DB by building from source, you can uninstall it wit At the `psql` prompt: ```sql - DROP EXTENSION IF EXISTS timescaledb CASCADE; + DROP EXTENSION timescaledb CASCADE; ``` Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. @@ -808,7 +808,7 @@ If you installed $TIMESCALE_DB by building from source, you can uninstall it wit ```bash - sudo nano /path/to/postgresql.conf + sudo vi /path/to/postgresql.conf ``` @@ -816,7 +816,7 @@ If you installed $TIMESCALE_DB by building from source, you can uninstall it wit ```bash - sudo nano /path/to/postgresql.conf + sudo vi /path/to/postgresql.conf ``` @@ -1082,7 +1082,7 @@ If you installed $TIMESCALE_DB on Windows using a package manager, you can unins 1. At the `psql` prompt, remove the extension: ```sql - DROP EXTENSION IF EXISTS timescaledb CASCADE; + DROP EXTENSION timescaledb CASCADE; ``` Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. @@ -1125,7 +1125,7 @@ If you installed $TIMESCALE_DB on Windows using a package manager, you can unins Restart-Service postgresql-x64-17 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **Remove $TIMESCALE_DB binaries** @@ -1143,7 +1143,7 @@ If you installed $TIMESCALE_DB on Windows using a package manager, you can unins Remove-Item "C:\Program Files\PostgreSQL\17\lib\timescaledb*.dll" ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. Find your $PG extension directory: @@ -1157,7 +1157,7 @@ If you installed $TIMESCALE_DB on Windows using a package manager, you can unins Remove-Item -Recurse "C:\Program Files\PostgreSQL\17\share\extension\timescaledb*" ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. From c39390e3cd449c778cfa37370bca12147c0b1fb7 Mon Sep 17 00:00:00 2001 From: billy-the-fish Date: Wed, 17 Dec 2025 17:56:39 +0100 Subject: [PATCH 12/15] chore: macos and windows --- .../_install-self-hosted-homebrew-based.mdx | 63 ++++++++++------ .../_install-self-hosted-windows-based.mdx | 12 +-- self-hosted/install/installation-macos.md | 10 +-- self-hosted/uninstall.md | 75 ++++++++++--------- 4 files changed, 83 insertions(+), 77 deletions(-) diff --git a/_partials/_install-self-hosted-homebrew-based.mdx b/_partials/_install-self-hosted-homebrew-based.mdx index 7cdc2c6b56..aa8e690b25 100644 --- a/_partials/_install-self-hosted-homebrew-based.mdx +++ b/_partials/_install-self-hosted-homebrew-based.mdx @@ -1,65 +1,82 @@ -1. Install Homebrew, if you don't already have it: +1. **Install Homebrew** + If homebrew is not already installed on your machine, run the following command: ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` For more information about Homebrew, including installation instructions, see the [Homebrew documentation][homebrew]. -1. At the command prompt, add the $TIMESCALE_DB Homebrew tap: + +1. **Install and start $PG** ```bash - brew tap timescale/tap + brew install postgresql@17 + brew cleanup --prune-prefix + brew services start postgresql@17 ``` -1. Install $TIMESCALE_DB and psql: +1. **Add $PG to your path** ```bash - brew install timescaledb libpq + echo 'export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc + source ~/.zshrc ``` -1. Update your path to include psql. +1. **Add the $TIMESCALE_DB Homebrew tap** ```bash - brew link --force libpq + brew tap timescale/tap ``` - On Intel chips, the symbolic link is added to `/usr/local/bin`. On Apple - Silicon, the symbolic link is added to `/opt/homebrew/bin`. +1. **Install $TIMESCALE_DB** -1. Run the `timescaledb-tune` script to configure your database: + ```bash + brew install timescaledb + ``` + +1. **Configure your database** ```bash timescaledb-tune --quiet --yes ``` -1. Change to the directory where the setup script is located. It is typically, - located at `/opt/homebrew/Cellar/timescaledb//bin/`, where - `` is the version of `timescaledb` that you installed: +1. **Run the setup script to complete installation** - ```bash - cd /opt/homebrew/Cellar/timescaledb//bin/ - ``` + ```bash + $(brew --prefix)/Cellar/timescaledb/$(brew list --versions timescaledb | awk '{print $2}')/bin/timescaledb_move.sh + ``` + + This command automatically locates the correct version and runs the setup script. + +1. **Start the $PG service** + + ```bash + brew services restart postgresql@17 + ``` -1. Run the setup script to complete installation. +1. **Verify $PG is running** ```bash - ./timescaledb_move.sh + brew services list | grep postgresql ``` -1. **Log in to $PG as `postgres`** + You should see `postgresql@17` with status `started`. + +1. **Connect to $PG** ```bash - sudo -u postgres psql + psql postgres ``` - You are in the psql shell. -1. **Set the password for `postgres`** + You are now in the psql shell. + +1. **Set the password for your database user** (optional but recommended) ```bash - \password postgres + \password ``` When you have set the password, type `\q` to exit psql. diff --git a/_partials/_install-self-hosted-windows-based.mdx b/_partials/_install-self-hosted-windows-based.mdx index a56d62ea7a..f8d6de536a 100644 --- a/_partials/_install-self-hosted-windows-based.mdx +++ b/_partials/_install-self-hosted-windows-based.mdx @@ -1,6 +1,5 @@ - 1. **Install the latest version of $PG and psql** 1. Download [$PG][pg-download], then run the installer. @@ -32,18 +31,11 @@ 1. **Restart the $PG service** - After installation, restart $PG for the changes to take effect. - - Open Services (press `Win + R`, type `services.msc`, and press Enter). Find the PostgreSQL service (usually named `postgresql-x64-`), right-click it, and select `Restart`. - - Alternatively, from an Administrator Command Prompt or PowerShell: - ```powershell - net stop postgresql-x64- - net start postgresql-x64- + Restart-Service postgresql-x64-18 ``` - Replace `` with your PostgreSQL version number (for example, `17`). + Replace `18` with your $PG version if different. diff --git a/self-hosted/install/installation-macos.md b/self-hosted/install/installation-macos.md index 6355df9ab9..6ce05acc7b 100644 --- a/self-hosted/install/installation-macos.md +++ b/self-hosted/install/installation-macos.md @@ -27,11 +27,11 @@ This section shows you how to: < TestingEnv /> -### Prerequisites -To install TimescaleDB on your MacOS device, you need: +## Install and configure $TIMESCALE_DB on $PG -* [$PG][install-postgresql]: for the latest functionality, install $PG v16 +This section shows you how to install the latest version of $PG and +$TIMESCALE_DB on a [supported platform][supported-platforms-link] using the packages supplied by $COMPANY. @@ -43,10 +43,6 @@ To keep your current $PG installation, [Install from source][install-from-source -## Install and configure $TIMESCALE_DB on $PG - -This section shows you how to install the latest version of $PG and -$TIMESCALE_DB on a [supported platform][supported-platforms-link] using the packages supplied by $COMPANY. diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index ae8e0a0d7d..9f1e21ed88 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -641,34 +641,47 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. ```sql DROP EXTENSION timescaledb CASCADE; ``` - + Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. +2. 1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - At the command prompt, remove `timescaledb` from `shared_preload_libraries` in the `postgresql.conf` configuration file: + Edit the $PG configuration file: ```bash - nano /opt/homebrew/var/postgresql@14/postgresql.conf + sudo vi /opt/homebrew/var/postgresql@17/postgresql.conf + ``` + + Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + + ``` + shared_preload_libraries = 'timescaledb' + ``` + + to: + + ``` shared_preload_libraries = '' ``` -1. **Save the changes to the `postgresql.conf` file** + If there are other extensions in the list, keep them and only remove `timescaledb`. + 1. **Restart $PG** ```bash - brew services restart postgresql + brew services restart postgresql@17 ``` 1. **Uninstall $TIMESCALE_DB** ```bash - brew uninstall timescaledb + brew uninstall timescaledb-tools timescaledb ``` 1. **Remove all the dependencies and related files** ```bash - brew remove timescaledb + brew untap timescale/tap ``` @@ -1095,34 +1108,34 @@ If you installed $TIMESCALE_DB on Windows using a package manager, you can unins 1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - Locate your $PG configuration file. The default location is: + 1. Open your $PG configuration file. The default location is: - ``` - C:\Program Files\PostgreSQL\\data\postgresql.conf - ``` + ``` + C:\Program Files\PostgreSQL\\data\postgresql.conf + ``` - Open the file in a text editor. You may need to run the editor as Administrator. + You may need to run the editor as Administrator. - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: + 1. Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - ``` - shared_preload_libraries = 'timescaledb' - ``` + ``` + shared_preload_libraries = 'timescaledb' + ``` - to: + to: - ``` - shared_preload_libraries = '' - ``` + ``` + shared_preload_libraries = '' + ``` - If there are other extensions in the list, keep them and only remove `timescaledb`. + If there are other extensions in the list, keep them and only remove `timescaledb`. - Save the file. + 1. Save the file. 1. **Restart $PG** ```powershell - Restart-Service postgresql-x64-17 + Restart-Service postgresql-x64-18 ``` Replace `18` with your $PG version if different. @@ -1131,30 +1144,18 @@ If you installed $TIMESCALE_DB on Windows using a package manager, you can unins Manually remove the $TIMESCALE_DB files from your $PG installation directory. - 1. Find your $PG library directory: - - ```powershell - pg_config --pkglibdir - ``` - 1. Remove $TIMESCALE_DB library files. You may need to run PowerShell as Administrator: ```powershell - Remove-Item "C:\Program Files\PostgreSQL\17\lib\timescaledb*.dll" + Remove-Item "C:\Program Files\PostgreSQL\18\lib\timescaledb*.dll" ``` Replace `18` with your $PG version if different. - 1. Find your $PG extension directory: - - ```powershell - pg_config --sharedir - ``` - 1. Remove $TIMESCALE_DB extension files: ```powershell - Remove-Item -Recurse "C:\Program Files\PostgreSQL\17\share\extension\timescaledb*" + Remove-Item -Recurse "C:\Program Files\PostgreSQL\18\share\extension\timescaledb*" ``` Replace `18` with your $PG version if different. From 4c4228ca9778731d746eff59a80f22a340719155 Mon Sep 17 00:00:00 2001 From: billy-the-fish Date: Wed, 17 Dec 2025 18:12:27 +0100 Subject: [PATCH 13/15] chore: check source build. Delete from uninstall. You uninstall according to your platform. --- .../_install-self-hosted-source-based.mdx | 2 +- self-hosted/uninstall.md | 348 ------------------ 2 files changed, 1 insertion(+), 349 deletions(-) diff --git a/_partials/_install-self-hosted-source-based.mdx b/_partials/_install-self-hosted-source-based.mdx index 5aabb85ef8..6d8555c9e3 100644 --- a/_partials/_install-self-hosted-source-based.mdx +++ b/_partials/_install-self-hosted-source-based.mdx @@ -18,7 +18,7 @@ our [Releases page][gh-releases]: ```bash - git checkout 2.17.2 + git checkout 2.24.0 ``` This command produces an error that you are now in `detached head` state. It diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index 9f1e21ed88..2c17847e99 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -730,354 +730,6 @@ Uninstall $SELF_LONG with Homebrew or MacPorts. - - -If you installed $TIMESCALE_DB by building from source, you can uninstall it without removing $PG. - - - -1. **Drop the $TIMESCALE_DB extension from your databases** - - Connect to each database where $TIMESCALE_DB is enabled and remove the extension: - - - - - - ```bash - sudo -u postgres psql -d - ``` - - - - - - ```bash - psql -U postgres -d - ``` - - - - - - ```powershell - psql -U postgres -d - ``` - - - - - - At the `psql` prompt: - - ```sql - DROP EXTENSION timescaledb CASCADE; - ``` - - Repeat this for all databases with $TIMESCALE_DB enabled. To exit psql, type `\q`. - - - - Using `CASCADE` will drop all $TIMESCALE_DB-specific objects including hypertables, continuous aggregates, and retention policies. Ensure you have backed up any data you want to keep. - - - -1. **Remove $TIMESCALE_DB from `shared_preload_libraries`** - - Locate your $PG configuration file: - - - - - - ```bash - psql -d postgres -c "SHOW config_file;" - ``` - - - - - - ```bash - psql -d postgres -c "SHOW config_file;" - ``` - - - - - - ```powershell - psql -U postgres -d postgres -c "SHOW config_file;" - ``` - - - - - - Edit the configuration file. You may need sudo/Administrator privileges: - - - - - - ```bash - sudo vi /path/to/postgresql.conf - ``` - - - - - - ```bash - sudo vi /path/to/postgresql.conf - ``` - - - - - - Open the configuration file in a text editor as Administrator. The default location is: - ``` - C:\Program Files\PostgreSQL\\data\postgresql.conf - ``` - - - - - - Find the line with `shared_preload_libraries` and remove `timescaledb` from the list. For example, change: - - ``` - shared_preload_libraries = 'timescaledb' - ``` - - to: - - ``` - shared_preload_libraries = '' - ``` - - If there are other extensions in the list, keep them and only remove `timescaledb`. - - Save the file. - -1. **Restart $PG** - - - - - - ```bash - sudo service postgresql restart - ``` - - Or, depending on your system: - - ```bash - sudo systemctl restart postgresql - ``` - - - - - - ```bash - brew services restart postgresql@ - ``` - - - - - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - - Find the PostgreSQL service, right-click it, and select `Restart`. - - Alternatively, from an Administrator Command Prompt or PowerShell: - - ```powershell - pg_ctl restart - ``` - - - - - -1. **Remove $TIMESCALE_DB binaries** - - Manually remove the $TIMESCALE_DB files from your $PG installation directory. - - Find your $PG library directory: - - - - - - ```bash - pg_config --pkglibdir - ``` - - - - - - ```bash - pg_config --pkglibdir - ``` - - - - - - ```powershell - pg_config --pkglibdir - ``` - - - - - - Remove $TIMESCALE_DB library files: - - - - - - ```bash - sudo rm $(pg_config --pkglibdir)/timescaledb*.so - ``` - - - - - - ```bash - sudo rm $(pg_config --pkglibdir)/timescaledb*.so - ``` - - - - On macOS, you may also need to remove `.dylib` files: - - ```bash - sudo rm $(pg_config --pkglibdir)/timescaledb*.dylib - ``` - - - - - - - - ```powershell - del "C:\Program Files\PostgreSQL\\lib\timescaledb*.dll" - ``` - - - - - - Find your $PG extension directory: - - - - - - ```bash - pg_config --sharedir - ``` - - - - - - ```bash - pg_config --sharedir - ``` - - - - - - ```powershell - pg_config --sharedir - ``` - - - - - - Remove $TIMESCALE_DB extension files: - - - - - - ```bash - sudo rm -rf $(pg_config --sharedir)/extension/timescaledb* - ``` - - - - - - ```bash - sudo rm -rf $(pg_config --sharedir)/extension/timescaledb* - ``` - - - - - - ```powershell - rmdir /s "C:\Program Files\PostgreSQL\\share\extension\timescaledb*" - ``` - - You may need Administrator privileges to delete these files. - - - - - -1. **(Optional) Remove the $TIMESCALE_DB source directory** - - If you no longer need the source code: - - - - - - ```bash - cd /path/to/parent/directory - rm -rf timescaledb - ``` - - - - - - ```bash - cd /path/to/parent/directory - rm -rf timescaledb - ``` - - - - - - ```powershell - cd \path\to\parent\directory - rmdir /s timescaledb - ``` - - - - - - - - - If you installed $TIMESCALE_DB on Windows using a package manager, you can uninstall it without removing $PG. From 2bc3998aab4c458c824cbfbc90c4fac00529ffc5 Mon Sep 17 00:00:00 2001 From: billy-the-fish Date: Thu, 18 Dec 2025 16:47:34 +0100 Subject: [PATCH 14/15] chore: toolkit, up to all Linux. --- .../_install-self-hosted-docker-based.mdx | 9 ++- _partials/_kubernetes-install-self-hosted.md | 45 +++++------ .../_toolkit-install-update-debian-base.md | 32 ++++---- .../_toolkit-install-update-debian-base.mdx | 78 ------------------- ..._toolkit-install-update-kubernetes-base.md | 41 ++++++++++ ...toolkit-install-update-kubernetes-base.mdx | 61 --------------- .../_toolkit-install-update-redhat-base.md | 35 +++++---- .../_toolkit-install-update-redhat-base.mdx | 38 ++++----- .../_toolkit-install-update-rocky-base.mdx | 40 +++++----- _partials/_toolkit-uninstall-debian-base.mdx | 4 +- .../_toolkit-uninstall-kubernetes-base.mdx | 9 +-- _partials/_toolkit-uninstall-redhat-base.mdx | 4 +- _partials/_toolkit-uninstall-rocky-base.mdx | 4 +- self-hosted/tooling/install-toolkit.md | 40 ++++------ self-hosted/uninstall.md | 12 +-- self-hosted/upgrades/upgrade-docker.md | 4 +- 16 files changed, 176 insertions(+), 280 deletions(-) delete mode 100644 _partials/_toolkit-install-update-debian-base.mdx create mode 100644 _partials/_toolkit-install-update-kubernetes-base.md delete mode 100644 _partials/_toolkit-install-update-kubernetes-base.mdx diff --git a/_partials/_install-self-hosted-docker-based.mdx b/_partials/_install-self-hosted-docker-based.mdx index fb882369b2..939e310930 100644 --- a/_partials/_install-self-hosted-docker-based.mdx +++ b/_partials/_install-self-hosted-docker-based.mdx @@ -151,10 +151,11 @@ information, see the [Docker documentation on logs][docker-logs]. You see the list of installed extensions: ```sql - Name | Version | Schema | Description - ---------------------+---------+------------+--------------------------------------------------------------------------------------- - plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language - timescaledb | 2.20.3 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) + List of installed extensionsh + Name | Version | Default version | Schema | Description + -------------+---------+-----------------+------------+--------------------------------------------------------------------------------------- + plpgsql | 1.0 | 1.0 | pg_catalog | PL/pgSQL procedural language + timescaledb | 2.24.0 | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition) ``` Press `q` to exit the list of extensions. diff --git a/_partials/_kubernetes-install-self-hosted.md b/_partials/_kubernetes-install-self-hosted.md index e81c6d5bac..91e8a1322a 100644 --- a/_partials/_kubernetes-install-self-hosted.md +++ b/_partials/_kubernetes-install-self-hosted.md @@ -9,13 +9,13 @@ To connect your Kubernetes cluster to $SELF_LONG running in the cluster: 1. Create the $COMPANY namespace: ```shell - kubectl create namespace timescale + kubectl create namespace tigerdata ``` 1. Set this namespace as the default for your session: ```shell - kubectl config set-context --current --namespace=timescale + kubectl config set-context --current --namespace=tigerdata ``` For more information, see [Kubernetes Namespaces][kubernetes-namespace]. @@ -29,7 +29,7 @@ To connect your Kubernetes cluster to $SELF_LONG running in the cluster: apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: timescale-pvc + name: tigerdata-pvc spec: accessModes: - ReadWriteOnce @@ -41,8 +41,9 @@ To connect your Kubernetes cluster to $SELF_LONG running in the cluster: 1. **Deploy $TIMESCALE_DB as a StatefulSet** - By default, the [$TIMESCALE_DB Docker image][timescale-docker-image] you are installing on Kubernetes uses the - default $PG database, user and password. To deploy $TIMESCALE_DB on Kubernetes, run the following command: + By default, the [$TIMESCALE_DB HA][timescale-ha-docker-image] you are installing on Kubernetes uses the + default $PG database, user and password. This image includes $TIMESCALE_DB and $TOOLKIT_LONG. + To deploy $TIMESCALE_DB on Kubernetes, run the following command: ```yaml kubectl apply -f - < -1. Update your local repository list: +1. **Update your local repository list** ```bash sudo apt update ``` -1. Install TimescaleDB Toolkit: +1. **Install TimescaleDB Toolkit** ```bash sudo apt install timescaledb-toolkit-postgresql-18 ``` -1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. -1. Create the $TOOLKIT_SHORT extension in the database: +1. **Connect to the database where you want to use $TOOLKIT_SHORT** + + ```bash + psql -d "postgres://:@:/" + ``` + +1. **Create the $TOOLKIT_SHORT extension in the database** ```sql CREATE EXTENSION timescaledb_toolkit; @@ -38,20 +37,25 @@ Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENS -1. Update your local repository list: +1. **Update your local repository list** ```bash apt update ``` -1. Install the latest version of $TOOLKIT_LONG: +1. **Install the latest version of $TOOLKIT_LONG** ```bash apt install timescaledb-toolkit-postgresql-18 ``` -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: +1. **Connect to the database where you want to use $TOOLKIT_SHORT** + + ```bash + psql -d "postgres://:@:/" + ``` + +1. **Update the $TOOLKIT_SHORT extension in the database** ```sql ALTER EXTENSION timescaledb_toolkit UPDATE; diff --git a/_partials/_toolkit-install-update-debian-base.mdx b/_partials/_toolkit-install-update-debian-base.mdx deleted file mode 100644 index ebdaa0e561..0000000000 --- a/_partials/_toolkit-install-update-debian-base.mdx +++ /dev/null @@ -1,78 +0,0 @@ -## Prerequisites - -To follow this procedure: - -- [Install $TIMESCALE_DB][debian-install]. -- Add the $TIMESCALE_DB repository and the GPG key. - -## Install $TOOLKIT_LONG - -These instructions use the `apt` package manager. - - - -1. Update your local repository list: - - ```bash - sudo apt update - ``` - -1. Install TimescaleDB Toolkit: - - ```bash - sudo apt install timescaledb-toolkit-postgresql-17 - ``` - -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 - apt update - ``` - -1. Install the latest version of $TOOLKIT_LONG: - - ```bash - apt 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: - - ```sql - ALTER EXTENSION timescaledb_toolkit UPDATE; - ``` - - - - For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active - sessions. - - - - - -[brew-install]: https://brew.sh -[cloud]: /use-timescale/:currentVersion:/services/ -[debian-install]: /self-hosted/:currentVersion:/install/installation-linux/ -[docker-install]: /self-hosted/:currentVersion:/install/installation-docker/ -[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 diff --git a/_partials/_toolkit-install-update-kubernetes-base.md b/_partials/_toolkit-install-update-kubernetes-base.md new file mode 100644 index 0000000000..cb5a0598c2 --- /dev/null +++ b/_partials/_toolkit-install-update-kubernetes-base.md @@ -0,0 +1,41 @@ +## Install $TOOLKIT_LONG + +The $TOOLKIT_SHORT extension is pre-installed and pre-enabled when you +[Install $TIMESCALE_DB on Kubernetes][kubernetes-install]. Once you start the container, the extension is already +active in your database and ready to use. No additional installation steps are required. + +## Update $TOOLKIT_LONG + +To get the latest version of $TOOLKIT_SHORT, update the $TIMESCALE_DB HA Docker image used by your Kubernetes StatefulSet: + + + +1. **Update the StatefulSet to use the latest image** + + Replace `` with the desired version tag. For example, `pg18`. You find the available tags on + the [$TIMESCALE_DB HA Docker Hub page][timescale-ha-tags]. + + ```shell + kubectl set image statefulset/timescaledb timescaledb=timescale/timescaledb-ha: -n tigerdata + ``` + + Kubernetes performs a rolling update, replacing the pod with the new image version. + +1. **Verify the new image is running** + + ```shell + kubectl get statefulset timescaledb -n tigerdata -o jsonpath='{.spec.template.spec.containers[0].image}' + ``` + +1. **Connect to your $TIMESCALE_DB pod and verify the extension versions** + + ```shell + kubectl exec -it test-pod -- bash -c "psql -h \$PGHOST -U \$PGUSER -d \$PGDATABASE" + \dx + ``` + + + +[kubernetes-install]: /self-hosted/:currentVersion:/install/installation-kubernetes/ +[connect]: /integrations/:currentVersion:/find-connection-details/ +[timescale-ha-tags]: https://hub.docker.com/r/timescale/timescaledb-ha/tags diff --git a/_partials/_toolkit-install-update-kubernetes-base.mdx b/_partials/_toolkit-install-update-kubernetes-base.mdx deleted file mode 100644 index 22d1b95df9..0000000000 --- a/_partials/_toolkit-install-update-kubernetes-base.mdx +++ /dev/null @@ -1,61 +0,0 @@ -## Prerequisites - -To follow this procedure: - -- [Install $TIMESCALE_DB on Kubernetes][kubernetes-install]. - -## Install $TOOLKIT_LONG - -$TOOLKIT_SHORT is included in the TimescaleDB HA Docker image and is already available in your Kubernetes deployment. - -To use $TOOLKIT_SHORT: - - - -1. Connect to your TimescaleDB pod: - - ```shell - kubectl exec -it -- psql -U postgres -d - ``` - - Replace `` with your TimescaleDB pod name (for example, `timescaledb-0`). - -1. Create the $TOOLKIT_SHORT extension in the database: - - ```sql - CREATE EXTENSION timescaledb_toolkit; - ``` - - - -## Update $TOOLKIT_LONG - -To get the latest version of $TOOLKIT_SHORT, [update the TimescaleDB HA Docker image][kubernetes-install] used by your Kubernetes deployment. - -After updating the image: - - - -1. Connect to your TimescaleDB pod: - - ```shell - kubectl exec -it -- psql -U postgres -d - ``` - -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. - - - - - -[kubernetes-install]: /self-hosted/:currentVersion:/install/installation-kubernetes/ -[connect]: /integrations/:currentVersion:/find-connection-details/ diff --git a/_partials/_toolkit-install-update-redhat-base.md b/_partials/_toolkit-install-update-redhat-base.md index fc3e1088ee..8a750b342b 100644 --- a/_partials/_toolkit-install-update-redhat-base.md +++ b/_partials/_toolkit-install-update-redhat-base.md @@ -1,36 +1,34 @@ -## Prerequisites - -To follow this procedure: - -- [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: +1. **Set up the repository** ```bash curl -s https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | sudo bash ``` -1. Update your local repository list: +1. **Update your local repository list** ```bash yum update ``` -1. Install $TOOLKIT_LONG: +1. **Install $TOOLKIT_LONG** ```bash yum install timescaledb-toolkit-postgresql-18 ``` -1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. -1. Create the $TOOLKIT_SHORT extension in the database: +1. **Connect to the database where you want to use $TOOLKIT_SHORT** + + ```bash + psql -d "postgres://:@:/" + ``` + +1. **Create the $TOOLKIT_SHORT extension in the database** ```sql CREATE EXTENSION timescaledb_toolkit; @@ -44,20 +42,25 @@ Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENS -1. Update your local repository list: +1. **Update your local repository list** ```bash yum update ``` -1. Install the latest version of $TOOLKIT_LONG: +1. **Install the latest version of $TOOLKIT_LONG** ```bash yum install timescaledb-toolkit-postgresql-18 ``` -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: +1. **Connect to the database where you want to use $TOOLKIT_SHORT** + + ```bash + psql -d "postgres://:@:/" + ``` + +1. **Update the $TOOLKIT_SHORT extension in the database** ```sql ALTER EXTENSION timescaledb_toolkit UPDATE; diff --git a/_partials/_toolkit-install-update-redhat-base.mdx b/_partials/_toolkit-install-update-redhat-base.mdx index 9224fbb685..e6cff27841 100644 --- a/_partials/_toolkit-install-update-redhat-base.mdx +++ b/_partials/_toolkit-install-update-redhat-base.mdx @@ -1,37 +1,28 @@ - -## Prerequisites - -To follow this procedure: - -- [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: +1. **Update your local repository list** ```bash - curl -s https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | sudo bash + sudo yum update ``` -1. Update your local repository list: +1. **Install $TOOLKIT_LONG** ```bash - yum update + sudo yum install timescaledb-toolkit-postgresql-18 ``` -1. Install $TOOLKIT_LONG: +1. **Connect to the database where you want to use $TOOLKIT_SHORT** ```bash - yum install timescaledb-toolkit-postgresql-17 + psql -d "postgres://:@:/" ``` -1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. -1. Create the $TOOLKIT_SHORT extension in the database: +1. **Create the $TOOLKIT_SHORT extension in the database** ```sql CREATE EXTENSION timescaledb_toolkit; @@ -45,20 +36,25 @@ Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENS -1. Update your local repository list: +1. **Update your local repository list** ```bash yum update ``` -1. Install the latest version of $TOOLKIT_LONG: +1. **Install the latest version of $TOOLKIT_LONG** + + ```bash + yum install timescaledb-toolkit-postgresql-18 + ``` + +1. **Connect to the database where you want to use $TOOLKIT_SHORT** ```bash - yum install timescaledb-toolkit-postgresql-17 + psql -d "postgres://:@:/" ``` -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: +1. **Update the $TOOLKIT_SHORT extension in the database** ```sql ALTER EXTENSION timescaledb_toolkit UPDATE; diff --git a/_partials/_toolkit-install-update-rocky-base.mdx b/_partials/_toolkit-install-update-rocky-base.mdx index a6d441f0be..f5b3a79ff3 100644 --- a/_partials/_toolkit-install-update-rocky-base.mdx +++ b/_partials/_toolkit-install-update-rocky-base.mdx @@ -1,37 +1,28 @@ - -## Prerequisites - -To follow this procedure: - -- [Install $TIMESCALE_DB][rocky-install]. -- Create a $TIMESCALE_DB repository in your `dnf` `repo.d` directory. - ## Install $TOOLKIT_LONG These instructions use the `dnf` package manager. -1. Set up the repository: +1. **Update your local repository list** ```bash - curl -s https://packagecloud.io/install/repositories/timescale/timescaledb/script.rpm.sh | sudo bash + sudo dnf update ``` -1. Update your local repository list: +1. **Install $TOOLKIT_LONG** ```bash - dnf update + sudo dnf install timescaledb-toolkit-postgresql-18 ``` -1. Install $TOOLKIT_LONG: +1. **Connect to the database where you want to use $TOOLKIT_SHORT** ```bash - dnf install timescaledb-toolkit-postgresql-17 + psql -d "postgres://:@:/" ``` -1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. -1. Create the $TOOLKIT_SHORT extension in the database: +1. **Create the $TOOLKIT_SHORT extension in the database** ```sql CREATE EXTENSION timescaledb_toolkit; @@ -45,20 +36,25 @@ Update $TOOLKIT_SHORT by installing the latest version and running `ALTER EXTENS -1. Update your local repository list: +1. **Update your local repository list** + + ```bash + sudo dnf update + ``` + +1. **Install the latest version of $TOOLKIT_LONG** ```bash - dnf update + sudo dnf install timescaledb-toolkit-postgresql-18 ``` -1. Install the latest version of $TOOLKIT_LONG: +1. **Connect to the database where you want to use $TOOLKIT_SHORT** ```bash - dnf install timescaledb-toolkit-postgresql-17 + psql -d "postgres://:@:/" ``` -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: +1. **Update the $TOOLKIT_SHORT extension in the database** ```sql ALTER EXTENSION timescaledb_toolkit UPDATE; diff --git a/_partials/_toolkit-uninstall-debian-base.mdx b/_partials/_toolkit-uninstall-debian-base.mdx index 2eb4bb3313..d3bebb7b6c 100644 --- a/_partials/_toolkit-uninstall-debian-base.mdx +++ b/_partials/_toolkit-uninstall-debian-base.mdx @@ -29,10 +29,10 @@ If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TI 1. **Uninstall the $TOOLKIT_SHORT package** ```bash - sudo apt remove timescaledb-toolkit-postgresql-17 + sudo apt remove timescaledb-toolkit-postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **(Optional) Remove dependencies** diff --git a/_partials/_toolkit-uninstall-kubernetes-base.mdx b/_partials/_toolkit-uninstall-kubernetes-base.mdx index b9da1bfefb..d7eef53b10 100644 --- a/_partials/_toolkit-uninstall-kubernetes-base.mdx +++ b/_partials/_toolkit-uninstall-kubernetes-base.mdx @@ -9,22 +9,21 @@ If you only want to remove the extension from a specific database without removi 1. **Connect to your TimescaleDB pod** ```shell - kubectl exec -it -- psql -U postgres -d + kubectl exec -it test-pod -- bash -c "psql -h \$PGHOST -U \$PGUSER -d \$PGDATABASE" ``` - Replace `` with your TimescaleDB pod name (for example, `timescaledb-0`). - 1. **Drop the $TOOLKIT_SHORT extension** At the `psql` prompt: ```sql - DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; + DROP EXTENSION timescaledb_toolkit; ``` - Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + Using `CASCADE` drops all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data + you want to keep. diff --git a/_partials/_toolkit-uninstall-redhat-base.mdx b/_partials/_toolkit-uninstall-redhat-base.mdx index 700611a2a2..5ce840dc87 100644 --- a/_partials/_toolkit-uninstall-redhat-base.mdx +++ b/_partials/_toolkit-uninstall-redhat-base.mdx @@ -29,10 +29,10 @@ If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TI 1. **Uninstall the $TOOLKIT_SHORT package** ```bash - sudo yum remove timescaledb-toolkit-postgresql-17 + sudo yum remove timescaledb-toolkit-postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **(Optional) Remove dependencies** diff --git a/_partials/_toolkit-uninstall-rocky-base.mdx b/_partials/_toolkit-uninstall-rocky-base.mdx index 17cfde269f..23bfb2cd23 100644 --- a/_partials/_toolkit-uninstall-rocky-base.mdx +++ b/_partials/_toolkit-uninstall-rocky-base.mdx @@ -29,10 +29,10 @@ If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TI 1. **Uninstall the $TOOLKIT_SHORT package** ```bash - sudo dnf remove timescaledb-toolkit-postgresql-17 + sudo dnf remove timescaledb-toolkit-postgresql-18 ``` - Replace `17` with your $PG version if different. + Replace `18` with your $PG version if different. 1. **(Optional) Remove dependencies** diff --git a/self-hosted/tooling/install-toolkit.md b/self-hosted/tooling/install-toolkit.md index 09bba16fc4..f2243167c4 100644 --- a/self-hosted/tooling/install-toolkit.md +++ b/self-hosted/tooling/install-toolkit.md @@ -29,24 +29,22 @@ If you're using [$CLOUD_LONG][cloud], the $TOOLKIT_LONG is already installed. If pre-built binaries are available * Building from source. For more information, see the [$TOOLKIT_SHORT developer documentation][toolkit-gh-docs] - +## Prerequisites - +To follow this procedure: -## Install $TOOLKIT_LONG +- [Install $TIMESCALE_DB][install] -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:pg18 -``` + -The $TOOLKIT_SHORT extension is pre-installed and pre-enabled in the `timescaledb-ha` image. Once you start the container, the extension is already active in your database and ready to use. No additional installation steps are required. +## Install $TOOLKIT_LONG -For more information on running $TIMESCALE_DB using Docker, see -[Install TimescaleDB from a Docker container][docker-install]. +The $TOOLKIT_SHORT extension is pre-installed and pre-enabled when you +[Install the $TIMESCALE_DB HA docker image from a Docker container][docker-install]. Once you +start the container, the extension is already active in your database and ready to use. No additional +installation steps are required. ## Update $TOOLKIT_LONG @@ -54,19 +52,19 @@ To get the latest version of $TOOLKIT_SHORT, [update][update-docker] the $TIMESC ## Uninstall $TOOLKIT_LONG -$TOOLKIT_SHORT is included in the TimescaleDB HA Docker image and cannot be uninstalled separately. To remove $TOOLKIT_SHORT, you need to remove the entire TimescaleDB container. See [Uninstall TimescaleDB from Docker][uninstall-docker]. +$TOOLKIT_SHORT is included in the $TIMESCALE_DB HA Docker image and cannot be uninstalled separately. To remove $TOOLKIT_SHORT, you need to remove the entire $TIMESCALE_DB container. See [Uninstall $TIMESCALE_DB from Docker][uninstall-docker]. -If you only want to remove the extension from a specific database without removing the container: +To remove the extension from a specific database without removing the container: -1. Connect to your database: +1. **Connect to your database** ```bash docker exec -it timescaledb psql -U postgres -d ``` -1. Drop the $TOOLKIT_SHORT extension: +1. **Drop the $TOOLKIT_SHORT extension** ```sql DROP EXTENSION IF EXISTS timescaledb_toolkit CASCADE; @@ -74,7 +72,8 @@ If you only want to remove the extension from a specific database without removi - Using `CASCADE` will drop all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any data you want to keep. + Using `CASCADE` drops all objects that depend on the $TOOLKIT_SHORT extension. Ensure you have backed up any + data you want to keep. @@ -140,12 +139,6 @@ If you only want to remove the extension from a specific database without removi -## Prerequisites - -To follow this procedure: - -- [Install $TIMESCALE_DB][macos-install]. - ## Install $TOOLKIT_LONG These instructions use the `brew` package manager. For more information on @@ -286,6 +279,7 @@ If you no longer need $TOOLKIT_SHORT, you can remove it without uninstalling $TI [brew-install]: https://brew.sh [cloud]: /use-timescale/:currentVersion:/services/ +[install]: /self-hosted/:currentVersion:/install/ [debian-install]: /self-hosted/:currentVersion:/install/installation-linux/ [docker-install]: /self-hosted/:currentVersion:/install/installation-docker/ [mst]: /mst/:currentVersion:/ diff --git a/self-hosted/uninstall.md b/self-hosted/uninstall.md index 2c17847e99..bf427f99a9 100644 --- a/self-hosted/uninstall.md +++ b/self-hosted/uninstall.md @@ -119,7 +119,7 @@ If you deployed $TIMESCALE_DB on Kubernetes, you can completely remove all assoc 1. **Remove any application deployments that connect to $TIMESCALE_DB** ```shell - kubectl delete deployment timescale-app + kubectl delete deployment tigerdata-app ``` 1. **Remove the service that exposes $TIMESCALE_DB within the cluster** @@ -146,27 +146,27 @@ If you deployed $TIMESCALE_DB on Kubernetes, you can completely remove all assoc ```shell - kubectl delete pvc timescale-pvc + kubectl delete pvc tigerdata-pvc ``` 1. **Remove the Kubernetes secret containing database credentials** ```shell - kubectl delete secret timescale-secret + kubectl delete secret tigerdata-secret ``` 1. **(Optional) Delete the namespace** If you created a dedicated namespace for $TIMESCALE_DB, you can remove it as well. - + Only delete the namespace if you're certain no other resources are using it. This will delete all resources in the namespace. ```shell - kubectl delete namespace timescale + kubectl delete namespace tigerdata ``` @@ -356,7 +356,7 @@ Take the following steps to uninstall $TIMESCALE_DB based on your distribution: - + diff --git a/self-hosted/upgrades/upgrade-docker.md b/self-hosted/upgrades/upgrade-docker.md index b6b1609fbf..8fbc0a702d 100644 --- a/self-hosted/upgrades/upgrade-docker.md +++ b/self-hosted/upgrades/upgrade-docker.md @@ -93,7 +93,7 @@ data. 1. **Pull the latest $TIMESCALE_DB image** - This command pulls the latest version of $TIMESCALE_DB running on $PG 17: + This command pulls the latest version of $TIMESCALE_DB running on $PG 18: ``` docker pull timescale/timescaledb-ha:pg18 @@ -168,7 +168,7 @@ If you have multiple databases, update each database separately. 1. **Pull the latest $TIMESCALE_DB image** - This command pulls the latest version of $TIMESCALE_DB running on $PG 17. + This command pulls the latest version of $TIMESCALE_DB running on $PG 18. ``` docker pull timescale/timescaledb:latest-pg18 From 2791d8d7db677ec5ccefe96b906cc6ae216aa386 Mon Sep 17 00:00:00 2001 From: billy-the-fish Date: Thu, 18 Dec 2025 17:51:43 +0100 Subject: [PATCH 15/15] chore: toolkit, source. --- .../_toolkit-install-update-source-base.mdx | 101 ++-------- _partials/_toolkit-uninstall-source-base.mdx | 189 ------------------ self-hosted/tooling/install-toolkit.md | 7 +- 3 files changed, 19 insertions(+), 278 deletions(-) diff --git a/_partials/_toolkit-install-update-source-base.mdx b/_partials/_toolkit-install-update-source-base.mdx index 1317684eac..efbf9eca8e 100644 --- a/_partials/_toolkit-install-update-source-base.mdx +++ b/_partials/_toolkit-install-update-source-base.mdx @@ -1,50 +1,13 @@ ## Install $TOOLKIT_LONG -To install $TOOLKIT_SHORT from source, follow the build and installation instructions in the [TimescaleDB Toolkit GitHub repository][toolkit-gh-install]. - -After building and installing from source: +To install $TOOLKIT_SHORT from source: -1. **Restart $PG** - - - - - - ```bash - sudo systemctl restart postgresql - ``` - - - - - - ```bash - brew services restart postgresql@ - ``` - - +1. **Build the extension from the latest source code** - On macOS, if the extension fails to load after building from source, you may need to create symlinks for library compatibility. The build process creates `.dylib` files, but the extension may expect `.so` files: - - ```bash - ln -sf $(pg_config --pkglibdir)/timescaledb_toolkit.dylib \ - $(pg_config --pkglibdir)/timescaledb_toolkit.so - ``` - - - - - - - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - Find the PostgreSQL service, right-click it, and select `Restart`. - - - - + Follow the build instructions in the [TimescaleDB Toolkit GitHub repository][toolkit-gh-install] to download and + build the latest version. 1. **Connect to your database** @@ -52,54 +15,25 @@ After building and installing from source: psql -d "postgres://:@:/" ``` -1. **Create the $TOOLKIT_SHORT extension** +1. **Update the Toolkit extension in the database** - At the `psql` prompt: - - ```sql + ```bash CREATE EXTENSION timescaledb_toolkit; ``` + ## Update $TOOLKIT_LONG -To update $TOOLKIT_SHORT installed from source, rebuild and reinstall the latest version. +To update $TOOLKIT_SHORT installed from source: -1. **Download the latest source code** - - Follow the build instructions in the [TimescaleDB Toolkit GitHub repository][toolkit-gh-install] to download and build the latest version. - -1. **Restart $PG** - - - - - - ```bash - sudo systemctl restart postgresql - ``` - - - - - - ```bash - brew services restart postgresql@ - ``` - - - - - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - Find the PostgreSQL service, right-click it, and select `Restart`. - - +1. **Build the extension from the latest source code** - + Follow the build instructions in the [TimescaleDB Toolkit GitHub repository][toolkit-gh-install] to download and + build the latest version. 1. **Connect to your database** @@ -107,21 +41,12 @@ To update $TOOLKIT_SHORT installed from source, rebuild and reinstall the latest psql -d "postgres://:@:/" ``` -1. **Update the $TOOLKIT_SHORT extension** +1. **Update the Toolkit extension in the database** - At the `psql` prompt: - - ```sql + ```bash ALTER EXTENSION timescaledb_toolkit UPDATE; ``` - - - For some $TOOLKIT_SHORT versions, you might need to disconnect and reconnect active - sessions. - - - [toolkit-gh-install]: https://github.com/timescale/timescaledb-toolkit#-installing-from-source diff --git a/_partials/_toolkit-uninstall-source-base.mdx b/_partials/_toolkit-uninstall-source-base.mdx index 06a3af7f99..5a5219e507 100644 --- a/_partials/_toolkit-uninstall-source-base.mdx +++ b/_partials/_toolkit-uninstall-source-base.mdx @@ -8,34 +8,10 @@ If you installed $TOOLKIT_SHORT by building from source, you can uninstall it wi Connect to each database where $TOOLKIT_SHORT is enabled and remove the extension: - - - - - ```bash - psql -d "postgres://:@:/" - ``` - - - - - ```bash psql -d "postgres://:@:/" ``` - - - - - ```powershell - psql -U postgres -d - ``` - - - - - At the `psql` prompt: ```sql @@ -50,171 +26,6 @@ If you installed $TOOLKIT_SHORT by building from source, you can uninstall it wi -1. **Remove $TOOLKIT_SHORT binaries** - - Manually remove the $TOOLKIT_SHORT files from your $PG installation directory. - - Find your $PG library directory: - - - - - - ```bash - pg_config --pkglibdir - ``` - - - - - - ```bash - pg_config --pkglibdir - ``` - - - - - - ```powershell - pg_config --pkglibdir - ``` - - - - - - Remove $TOOLKIT_SHORT library files: - - - - - - ```bash - sudo rm $(pg_config --pkglibdir)/timescaledb_toolkit*.so - ``` - - - - - - ```bash - sudo rm $(pg_config --pkglibdir)/timescaledb_toolkit*.so - ``` - - - - On macOS, you may also need to remove `.dylib` files: - - ```bash - sudo rm $(pg_config --pkglibdir)/timescaledb_toolkit*.dylib - ``` - - - - - - - - ```powershell - del "C:\Program Files\PostgreSQL\\lib\timescaledb_toolkit*.dll" - ``` - - - - - - Find your $PG extension directory: - - - - - - ```bash - pg_config --sharedir - ``` - - - - - - ```bash - pg_config --sharedir - ``` - - - - - - ```powershell - pg_config --sharedir - ``` - - - - - - Remove $TOOLKIT_SHORT extension files: - - - - - - ```bash - sudo rm -rf $(pg_config --sharedir)/extension/timescaledb_toolkit* - ``` - - - - - - ```bash - sudo rm -rf $(pg_config --sharedir)/extension/timescaledb_toolkit* - ``` - - - - - - ```powershell - rmdir /s "C:\Program Files\PostgreSQL\\share\extension\timescaledb_toolkit*" - ``` - - You may need Administrator privileges to delete these files. - - - - - -1. **Restart $PG** - - - - - - ```bash - sudo systemctl restart postgresql - ``` - - - - - - ```bash - brew services restart postgresql@ - ``` - - - - - - Open Services (press `Win + R`, type `services.msc`, and press Enter). - Find the PostgreSQL service, right-click it, and select `Restart`. - - - - - [source-install]: /self-hosted/:currentVersion:/install/installation-source/ diff --git a/self-hosted/tooling/install-toolkit.md b/self-hosted/tooling/install-toolkit.md index f2243167c4..280c3fab2d 100644 --- a/self-hosted/tooling/install-toolkit.md +++ b/self-hosted/tooling/install-toolkit.md @@ -165,7 +165,12 @@ installing or using Homebrew, see [the `brew` homepage][brew-install]. brew install timescaledb-toolkit ``` -1. [Connect to the database][connect] where you want to use $TOOLKIT_SHORT. +1. **Connect to $PG** + + ```bash + psql postgres + ``` + 1. Create the $TOOLKIT_SHORT extension in the database: ```sql