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.

Plan your upgrade

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.

Upgrade TimescaleDB to the next minor version

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 individually.

Upgrading the TimescaleDB extension

  1. Connect to psql using the -X flag. This prevents any .psqlrc commands from accidentally triggering the load of a previous TimescaleDB version on session startup.

  2. At the psql prompt, upgrade the TimescaleDB extension. This must be the first command you execute in the current session:

    ALTER EXTENSION timescaledb UPDATE;
  3. Check that you have upgraded to the latest version of the extension with the \dx command. The output should show the upgraded version number.

    \dx timescaledb

Found an issue on this page?

Report an issue!

Keywords

Related Content