Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust TimescaleDB version match for migration #2820

Merged
merged 3 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions _partials/_migrate_from_timescaledb_version.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
import OpenSupportRequest from "versionContent/_partials/_migrate_open_support_request.mdx"
It is very important that the version of the TimescaleDB extension is the same
in the source and target databases. This requires upgrading the TimescaleDB
extension in the source database before migrating.

It is very important that the version of the TimescaleDB extension in the
target database is the same as it was in the source database.

You can determine the version of TimescaleDB in the source database with the
You can determine the version of TimescaleDB in the target database with the
following command:

```bash
psql $SOURCE -c "SELECT extversion FROM pg_extension WHERE extname = 'timescaledb';"
psql $TARGET -c "SELECT extversion FROM pg_extension WHERE extname = 'timescaledb';"
```

You can alter the extension version in Timescale with the following query:
To update the TimescaleDB extension in your source database, first ensure that
the desired version is installed from your package repository. Then you can
upgrade the extension with the following query:

```bash
psql $TARGET -c "ALTER EXTENSION timescaledb UPDATE TO '<version here>';"
psql $SOURCE -c "ALTER EXTENSION timescaledb UPDATE TO '<version here>';"
```

The extension version must be present on Timescale in order for this to be
successful. The following table gives an overview of the PostgreSQL version and
lowest available TimescaleDB extension version:

| pg12 | pg13 | pg14 | pg15 |
|-------|-------|-------|-------|
| 1.7.5 | 2.1.0 | 2.5.0 | 2.9.0 |

[//]: # (Note: to update this table, consult https://timescale.slab.com/posts/migrations-and-version-compatibility-5red287x)

By default, Timescale instances run on PostgreSQL version 15. If you require a
lower version for a migration, open a support request.
For more information and guidance, consult the [Upgrade TimescaleDB] page.

<OpenSupportRequest />
[Upgrade TimescaleDB]: https://docs.timescale.com/self-hosted/latest/upgrades/