Because TimescaleDB is a PostgreSQL extension, you need to ensure you keep your underlying PostgreSQL installation up to date. When you upgrade your TimescaleDB extension to a new version, always take the time to check if you need to also upgrade your PostgreSQL version. If you are running an older version of PostgreSQL, you need to upgrade it first, before you upgrade your TimescaleDB extension.
Try for free on Timescale
Timescale is a fully managed service with automatic backup and restore, high availability with replication, seamless scaling and resizing, and much more. You can try Timescale free for thirty days.
TimescaleDB supports these PostgreSQL releases. If you are not running a compatible PostgreSQL version, make sure you upgrade PostgreSQL before you upgrade TimescaleDB:
PostgreSQL 17 | PostgreSQL 16 | PostgreSQL 15 | PostgreSQL 14 | PostgreSQL 13 | PostgreSQL 12 | PostgreSQL 11 | PostgreSQL 10 | |
---|---|---|---|---|---|---|---|---|
TimescaleDB 2.17 and higher | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
TimescaleDB 2.16 and higher | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
TimescaleDB 2.15 and higher | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
TimescaleDB 2.14 and higher | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
TimescaleDB 2.13 and higher | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
TimescaleDB 2.12 and higher | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
TimescaleDB 2.10 and higher | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
TimescaleDB 2.5 to 2.9 | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
TimescaleDB 2.4 | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ |
TimescaleDB 2.1 to 2.3 | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ |
TimescaleDB 2.0 | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ |
TimescaleDB 1.7 | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
You cannot upgrade TimescaleDB and PostgreSQL at the same time. You upgrade each product in the following steps:
- Upgrade TimescaleDB to the desired version in your current PostgreSQL installation.
- Upgrade PostgreSQL to the desired version.
The version of TimescaleDB installed in your PostgreSQL deployment must be the same before and after the PostgreSQL upgrade.
You can upgrade your PostgreSQL installation in-place. This means that you do not need to dump and restore your data. However, it is still important that you plan for your upgrade ahead of time.
Before you upgrade:
- Read the release notes for the PostgreSQL version you are upgrading to.
- Perform a backup of your database. While PostgreSQL and TimescaleDB upgrades are performed in-place, upgrading is an intrusive operation. Always make sure you have a backup on hand, and that the backup is readable in the case of disaster.
You can use the pg_upgrade
tool to upgrade PostgreSQL in-place.
This means that you do not need to dump and restore your data. Instead,
pg_upgrade
allows you to retain the data files of your current PostgreSQL
installation while binding the new PostgreSQL binary runtime to them. This is
supported for PostgreSQL 8.4 and higher.
Before you begin, determine the location of the PostgreSQL binary and your data directory on your local system.
At the psql prompt, perform the upgrade:
pg_upgrade -b <OLD_BIN_DIR> -B <NEW_BIN_DIR> -d <OLD_DATA_DIR> -D <NEW_DATA_DIR>
If you are moving data to a new physical instance of PostgreSQL, you can use the
pg_dump
and pg_restore
tools to dump your data from the old database, and
then restore it into the new, upgraded, database. For more information, see the backup and restore section.
Keywords
Found an issue on this page?Report an issue or Edit this page in GitHub.