Because TimescaleDB is a PostgreSQL extension, you need to ensure you keep your underlying PotsgreSQL 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 16||PostgreSQL 15||PostgreSQL 14||PostgreSQL 13||PostgreSQL 12||PostgreSQL 11||PostgreSQL 10||PostgreSQL 9.6|
|TimescaleDB 2.13 and higher||✅||✅||✅||✅||❌||❌||❌||❌|
|TimescaleDB 2.12 and higher||❌||✅||✅||✅||❌||❌||❌||❌|
|TimescaleDB 2.5 to 2.9||❌||❌||✅||✅||✅||❌||❌||❌|
|TimescaleDB 2.1 to 2.3||❌||❌||❌||✅||✅||✅||❌||❌|
You need to upgrade PostgreSQL and TimescaleDB in two separate steps. This is so that you can make sure each upgrade completes properly. For example, if you are running PostgreSQL 10 and TimescaleDB 1.7.5, and you want to upgrade to PostgreSQL 13 and TimescaleDB 2.2, upgrade in this order:
- Upgrade PostgreSQL 10 to PostgreSQL 12
- Upgrade TimescaleDB 1.7.5 to TimescaleDB 2.2 on PostgreSQL 12
- Upgrade PostgreSQL 12 to PostgreSQL 13 with TimescaleDB 2.2 installed
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_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.
Found an issue on this page?Report an issue!