Skip to content

Commit 86dc387

Browse files
authored
Add uninstall for TimescaleDB and Toolkit (#4601)
1 parent 54dbdac commit 86dc387

38 files changed

+1662
-343
lines changed

_partials/_add-timescaledb-to-a-database.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@
2424
You see the list of installed extensions:
2525

2626
```sql
27-
List of installed extensions
28-
Name | Version | Schema | Description
29-
-------------+---------+------------+---------------------------------------------------------------------------------------
30-
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
31-
timescaledb | 2.17.2 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
27+
List of installed extensions
28+
Name | Version | Default version | Schema | Description
29+
-------------+---------+-----------------+------------+---------------------------------------------------------------------------------------
30+
plpgsql | 1.0 | 1.0 | pg_catalog | PL/pgSQL procedural language
31+
timescaledb | 2.24.0 | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
32+
(2 rows)
3233
```
33-
Press q to exit the list of extensions.
34+
Press `\q` to exit the list of extensions.
3435

3536
</Procedure>

_partials/_install-self-hosted-debian-based-end.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
1. **Install TimescaleDB**
99

1010
```bash
11-
sudo apt install timescaledb-2-postgresql-17 postgresql-client-17
11+
sudo apt install timescaledb-2-postgresql-18 postgresql-client-18
1212
```
1313

1414
To install a specific $TIMESCALE_DB [release][releases-page], set the version. For example:

_partials/_install-self-hosted-debian-based.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
1. **Install TimescaleDB**
5959

6060
```bash
61-
sudo apt install timescaledb-2-postgresql-17 postgresql-client-17
61+
sudo apt install timescaledb-2-postgresql-18 postgresql-client-18
6262
```
6363

6464
To install a specific $TIMESCALE_DB [release][releases-page], set the version. For example:

_partials/_install-self-hosted-docker-based.mdx

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
$TIMESCALE_DB experience. It uses [Ubuntu][ubuntu], includes
1111
[$TOOLKIT_LONG](https://github.com/timescale/timescaledb-toolkit), and support for PostGIS and Patroni.
1212

13-
To install the latest release based on $PG 17:
13+
To install the latest release based on $PG 18:
1414

1515
```
16-
docker pull timescale/timescaledb-ha:pg17
16+
docker pull timescale/timescaledb-ha:pg18
1717
```
1818

1919
$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,11 +22,15 @@
2222

2323
Replace `</a/local/data/folder>` with the path to the folder you want to keep your data in the following command.
2424
```
25-
docker run -d --name timescaledb -p 5432:5432 -v </a/local/data/folder>:/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg17
25+
docker run -d --name timescaledb -p 5432:5432 -v </a/local/data/folder>:/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg18
2626
```
27-
27+
2828
If you are running multiple container instances, change the port each Docker instance runs on.
2929

30+
<Highlight type="note">
31+
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.
32+
</Highlight>
33+
3034
On UNIX-based systems, Docker modifies Linux IP tables to bind the container. If your system uses Linux Uncomplicated Firewall (UFW), Docker may
3135
[override your UFW port binding settings][override-binding]. To prevent this, add `DOCKER_OPTS="--iptables=false"` to `/etc/default/docker`.
3236

@@ -35,9 +39,11 @@
3539
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:
3640

3741
```bash
38-
psql -d "postgres://postgres:password@localhost/postgres"
42+
psql -d "postgres://postgres:password@127.0.0.1:5432/postgres"
3943
```
4044

45+
If you changed the port mapping in step 2 (e.g., to 5433), update the port in the connection string accordingly.
46+
4147
1. **Check that $TIMESCALE_DB is installed**
4248

4349
```sql
@@ -47,11 +53,11 @@
4753
You see the list of installed extensions:
4854

4955
```sql
50-
Name | Version | Schema | Description
51-
---------------------+---------+------------+---------------------------------------------------------------------------------------
52-
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
53-
timescaledb | 2.20.3 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
54-
timescaledb_toolkit | 1.21.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities
56+
Name | Version | Default version | Schema | Description
57+
---------------------+---------+-----------------+------------+---------------------------------------------------------------------------------------
58+
plpgsql | 1.0 | 1.0 | pg_catalog | PL/pgSQL procedural language
59+
timescaledb | 2.24.0 | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
60+
timescaledb_toolkit | 1.22.0 | 1.22.0 | public | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities
5561
(3 rows)
5662
```
5763

@@ -66,7 +72,7 @@ outside world, you can bind to `127.0.0.1` instead of the public interface, usin
6672

6773
```bash
6874
docker run -d --name timescaledb -p 127.0.0.1:5432:5432 \
69-
-v </a/local/data/folder>:/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg17
75+
-v </a/local/data/folder>:/pgdata -e PGDATA=/pgdata -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg18
7076
```
7177

7278
If you don't want to install `psql` and other $PG client tools locally,
@@ -105,7 +111,7 @@ information, see the [Docker documentation on logs][docker-logs].
105111
To install the latest release based on $PG 17:
106112

107113
```
108-
docker pull timescale/timescaledb:latest-pg17
114+
docker pull timescale/timescaledb:latest-pg18
109115
```
110116

111117
$TIMESCALE_DB is pre-created in the default $PG database and added by default to any new database you create in this image.
@@ -115,21 +121,27 @@ information, see the [Docker documentation on logs][docker-logs].
115121

116122
```
117123
docker run -v </a/local/data/folder>:/pgdata -e PGDATA=/pgdata \
118-
-d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg17
124+
-d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg18
119125
```
120126

121127
If you are running multiple container instances, change the port each Docker instance runs on.
122128

129+
<Highlight type="note">
130+
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.
131+
</Highlight>
132+
123133
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`.
124134

125135
1. **Connect to a database on your $PG instance**
126136

127137
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:
128138

129139
```bash
130-
psql -d "postgres://postgres:password@localhost/postgres"
140+
psql -d "postgres://postgres:password@127.0.0.1:5432/postgres"
131141
```
132142

143+
If you changed the port mapping in step 2 (e.g., to 5433), update the port in the connection string accordingly.
144+
133145
1. **Check that $TIMESCALE_DB is installed**
134146

135147
```sql
@@ -139,10 +151,11 @@ information, see the [Docker documentation on logs][docker-logs].
139151
You see the list of installed extensions:
140152

141153
```sql
142-
Name | Version | Schema | Description
143-
---------------------+---------+------------+---------------------------------------------------------------------------------------
144-
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
145-
timescaledb | 2.20.3 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
154+
List of installed extensionsh
155+
Name | Version | Default version | Schema | Description
156+
-------------+---------+-----------------+------------+---------------------------------------------------------------------------------------
157+
plpgsql | 1.0 | 1.0 | pg_catalog | PL/pgSQL procedural language
158+
timescaledb | 2.24.0 | 2.24.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
146159
```
147160

148161
Press `q` to exit the list of extensions.
@@ -155,7 +168,7 @@ outside world, you can bind to `127.0.0.1` instead of the public interface, usin
155168
```bash
156169
docker run -v </a/local/data/folder>:/pgdata -e PGDATA=/pgdata \
157170
-d --name timescaledb -p 127.0.0.1:5432:5432 \
158-
-e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg17
171+
-e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg18
159172
```
160173

161174
If you don't want to install `psql` and other $PG client tools locally,
@@ -179,7 +192,7 @@ data volume using the `-v` flag:
179192
```bash
180193
docker run -d --name timescaledb -p 5432:5432 \
181194
-v </your/data/dir>:/pgdata -e PGDATA=/pgdata \
182-
-e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg17
195+
-e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg18
183196
```
184197

185198
When you install $TIMESCALE_DB using a Docker container, the $PG settings

_partials/_install-self-hosted-homebrew-based.mdx

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,82 @@
11
<Procedure>
22

3-
1. Install Homebrew, if you don't already have it:
3+
1. **Install Homebrew**
44

5+
If homebrew is not already installed on your machine, run the following command:
56
```bash
67
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
78
```
89

910
For more information about Homebrew, including installation instructions,
1011
see the [Homebrew documentation][homebrew].
11-
1. At the command prompt, add the $TIMESCALE_DB Homebrew tap:
12+
13+
1. **Install and start $PG**
1214

1315
```bash
14-
brew tap timescale/tap
16+
brew install postgresql@17
17+
brew cleanup --prune-prefix
18+
brew services start postgresql@17
1519
```
1620

17-
1. Install $TIMESCALE_DB and psql:
21+
1. **Add $PG to your path**
1822

1923
```bash
20-
brew install timescaledb libpq
24+
echo 'export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc
25+
source ~/.zshrc
2126
```
2227

23-
1. Update your path to include psql.
28+
1. **Add the $TIMESCALE_DB Homebrew tap**
2429

2530
```bash
26-
brew link --force libpq
31+
brew tap timescale/tap
2732
```
2833

29-
On Intel chips, the symbolic link is added to `/usr/local/bin`. On Apple
30-
Silicon, the symbolic link is added to `/opt/homebrew/bin`.
34+
1. **Install $TIMESCALE_DB**
3135

32-
1. Run the `timescaledb-tune` script to configure your database:
36+
```bash
37+
brew install timescaledb
38+
```
39+
40+
1. **Configure your database**
3341

3442
```bash
3543
timescaledb-tune --quiet --yes
3644
```
3745

38-
1. Change to the directory where the setup script is located. It is typically,
39-
located at `/opt/homebrew/Cellar/timescaledb/<VERSION>/bin/`, where
40-
`<VERSION>` is the version of `timescaledb` that you installed:
46+
1. **Run the setup script to complete installation**
4147

42-
```bash
43-
cd /opt/homebrew/Cellar/timescaledb/<VERSION>/bin/
44-
```
48+
```bash
49+
$(brew --prefix)/Cellar/timescaledb/$(brew list --versions timescaledb | awk '{print $2}')/bin/timescaledb_move.sh
50+
```
51+
52+
This command automatically locates the correct version and runs the setup script.
53+
54+
1. **Start the $PG service**
55+
56+
```bash
57+
brew services restart postgresql@17
58+
```
4559

46-
1. Run the setup script to complete installation.
60+
1. **Verify $PG is running**
4761

4862
```bash
49-
./timescaledb_move.sh
63+
brew services list | grep postgresql
5064
```
5165

52-
1. **Log in to $PG as `postgres`**
66+
You should see `postgresql@17` with status `started`.
67+
68+
1. **Connect to $PG**
5369

5470
```bash
55-
sudo -u postgres psql
71+
psql postgres
5672
```
57-
You are in the psql shell.
5873

59-
1. **Set the password for `postgres`**
74+
You are now in the psql shell.
75+
76+
1. **Set the password for your database user** (optional but recommended)
6077

6178
```bash
62-
\password postgres
79+
\password
6380
```
6481

6582
When you have set the password, type `\q` to exit psql.

_partials/_install-self-hosted-redhat-based.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
To avoid errors, **do not** install $TDB_APACHE and $TDB_COMMUNITY at the same time.
7676
7777
```bash
78-
sudo yum install timescaledb-2-postgresql-17 postgresql17
78+
sudo yum install timescaledb-2-postgresql-18 postgresql18
7979
```
8080
8181
<!-- hack until we have bandwidth to rewrite this linting rule -->
@@ -94,13 +94,13 @@
9494
1. **Initialize the $PG instance**
9595
9696
```bash
97-
sudo /usr/pgsql-17/bin/postgresql-17-setup initdb
97+
sudo /usr/pgsql-18/bin/postgresql-18-setup initdb
9898
```
9999
100100
1. **Tune your $PG instance for TimescaleDB**
101101
102102
```bash
103-
sudo timescaledb-tune --pg-config=/usr/pgsql-17/bin/pg_config
103+
sudo timescaledb-tune --pg-config=/usr/pgsql-18/bin/pg_config
104104
```
105105
106106
This script is included with the `timescaledb-tools` package when you install TimescaleDB.
@@ -109,8 +109,8 @@
109109
1. **Enable and start $PG**
110110
111111
```bash
112-
sudo systemctl enable postgresql-17
113-
sudo systemctl start postgresql-17
112+
sudo systemctl enable postgresql-18
113+
sudo systemctl start postgresql-18
114114
```
115115
116116
1. **Log in to $PG as `postgres`**

_partials/_install-self-hosted-redhat-rocky.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
To avoid errors, **do not** install $TDB_APACHE and $TDB_COMMUNITY at the same time.
55

66
```bash
7-
sudo dnf install -y postgresql16-server postgresql16-contrib timescaledb-2-postgresql-16
7+
sudo dnf install -y postgresql18-server postgresql18-contrib timescaledb-2-postgresql-18
88
```
99

1010
1. **Initialize the $PG instance**
1111

1212
```bash
13-
sudo /usr/pgsql-16/bin/postgresql-16-setup initdb
13+
sudo /usr/pgsql-18/bin/postgresql-18-setup initdb
1414
```
1515

1616
1. **Tune your $PG instance for TimescaleDB**
1717

1818
```bash
19-
sudo timescaledb-tune --pg-config=/usr/pgsql-16/bin/pg_config
19+
sudo timescaledb-tune --pg-config=/usr/pgsql-18/bin/pg_config
2020
```
2121

2222
This script is included with the `timescaledb-tools` package when you install TimescaleDB.
@@ -25,8 +25,8 @@
2525
1. **Enable and start $PG**
2626

2727
```bash
28-
sudo systemctl enable postgresql-16
29-
sudo systemctl start postgresql-16
28+
sudo systemctl enable postgresql-18
29+
sudo systemctl start postgresql-18
3030
```
3131

3232
1. **Log in to $PG as `postgres`**

_partials/_install-self-hosted-redhat-x-platform.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
To avoid errors, **do not** install $TDB_APACHE and $TDB_COMMUNITY at the same time.
1111

1212
```bash
13-
sudo yum install timescaledb-2-postgresql-17 postgresql17
13+
sudo yum install timescaledb-2-postgresql-18 postgresql18
1414
```
1515

1616
<!-- hack until we have bandwidth to rewrite this linting rule -->
@@ -29,13 +29,13 @@
2929
1. **Initialize the $PG instance**
3030

3131
```bash
32-
sudo /usr/pgsql-17/bin/postgresql-17-setup initdb
32+
sudo /usr/pgsql-18/bin/postgresql-18-setup initdb
3333
```
3434

3535
1. **Tune your $PG instance for TimescaleDB**
3636

3737
```bash
38-
sudo timescaledb-tune --pg-config=/usr/pgsql-17/bin/pg_config
38+
sudo timescaledb-tune --pg-config=/usr/pgsql-18/bin/pg_config
3939
```
4040

4141
This script is included with the `timescaledb-tools` package when you install TimescaleDB.
@@ -44,8 +44,8 @@
4444
1. **Enable and start $PG**
4545

4646
```bash
47-
sudo systemctl enable postgresql-17
48-
sudo systemctl start postgresql-17
47+
sudo systemctl enable postgresql-18
48+
sudo systemctl start postgresql-18
4949
```
5050

5151
1. **Log in to $PG as `postgres`**

0 commit comments

Comments
 (0)