Minor TimescaleDB upgrades
A minor upgrade is when you upgrade within your current major version of TimescaleDB. For example, when you upgrade from TimescaleDB 2.5, to TimescaleDB 2.6.
For upgrading to a new major version, for example upgrading from TimescaleDB 1 to TimescaleDB 2, see the major upgrades section.
You can upgrade your on-premise TimescaleDB 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 TimescaleDB version you are upgrading to.
- Check which PostgreSQL version you are currently running. You might need to upgrade to the latest PostgreSQL version before you begin your TimescaleDB upgrade.
- Perform a backup of your database. While 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.
This upgrade uses the PostgreSQL
ALTER EXTENSION function to upgrade to the
latest version of the TimescaleDB extension. TimescaleDB supports having
different extension versions on different databases within the same PostgreSQL
instance. This allows you to upgrade extensions independently on different
databases. Run the
ALTER EXTENSION function on each database to upgrade them
Upgrading the TimescaleDB extension
Connect to psql using the
-Xflag. This prevents any
.psqlrccommands from accidentally triggering the load of a previous TimescaleDB version on session startup.
At the psql prompt, upgrade the TimescaleDB extension. This must be the first command you execute in the current session:
ALTER EXTENSION timescaledb UPDATE;
Check that you have upgraded to the latest version of the extension with the
\dxcommand. The output should show the upgraded version number.
Found an issue on this page?Report an issue!