Troubleshooting

This section contains some ideas for troubleshooting common problems experienced with upgrades.

Install or upgrade of TimescaleDB Toolkit fails

`

  1. ERROR: extension "timescaledb_toolkit" has no update path from version "1.2" to version "1.3"

`

In some cases, when you create the TimescaleDB Toolkit extension, or upgrade it with the ALTER EXTENSION timescaledb_toolkit UPDATE command, it might fail with the above error.

This occurs if the list of available extensions does not include the version you are trying to upgrade to, and it can occur if the package was not installed correctly in the first place. To correct the problem, install the upgrade package, restart PostgreSQL, verify the version, and then attempt the update again.

Troubleshooting TimescaleDB Toolkit setup

  1. If you’re installing Toolkit from a package, check your package manager’s local repository list. Make sure the TimescaleDB repository is available and contains Toolkit. For instructions on adding the TimescaleDB repository, see the installation guides:

  2. Update your local repository list with apt update or yum update.

  3. Restart your PostgreSQL service.

  4. Check that the right version of Toolkit is among your available extensions:

    1. SELECT * FROM pg_available_extensions
    2. WHERE name = 'timescaledb_toolkit';

    The result should look like this:

    1. -[ RECORD 1 ]-----+--------------------------------------------------------------------------------------
    2. name | timescaledb_toolkit
    3. default_version | 1.6.0
    4. installed_version | 1.6.0
    5. comment | Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities
  5. Retry CREATE EXTENSION or ALTER EXTENSION.

Can’t access file “timescaledb-VERSION” after update

`

  1. ERROR: could not access file "timescaledb-<VERSION>": No such file or directory

`

If the error occurs immediately after updating your version of TimescaleDB and the file mentioned is from the previous version, it is probably due to an incomplete update process. Within the greater PostgreSQL server instance, each database that has TimescaleDB installed needs to be updated with the SQL command ALTER EXTENSION timescaledb UPDATE; while connected to that database. Otherwise, the database will be looking for the previous version of the timescaledb files.

See our update docs for more info.

Upgrading fails with an error saying “old version has already been loaded”

`

  1. ERROR: extension "timescaledb" cannot be updated after the old version has already been loaded

`

When you use the ALTER EXTENSION timescaledb UPDATE command to upgrade, this error might appear.

This occurs if you don’t run ALTER EXTENSION timescaledb UPDATE command as the first command after starting a new session using psql or if you use tab completion when running the command. Tab completion triggers metadata queries in the background which prevents the alter extension from being the first command.

To correct the problem, execute the ALTER EXTENSION command like this:

``sql psql -X -c ‘ALTER EXTENSION timescaledb UPDATE;’

  1. export const _frontmatter = {"title":"Upgrading fails with an error saying \"old version has already been loaded\"","section":"troubleshooting","topics":["upgrades"],"errors":[{"language":"sql","message":"ERROR: extension \"timescaledb\" cannot be updated after the old version has already been loaded"}],"keywords":["upgrades"],"tags":["upgrade"]}

TimescaleDB upgrade fails with no update path

`

  1. ERROR: extension "timescaledb_toolkit" has no update path from version "1.2" to version "1.3"

`

In some cases, when you use the ALTER EXTENSION timescaledb UPDATE command to upgrade, it might fail with the above error.

This occurs if the list of available extensions does not include the version you are trying to upgrade to, and it can occur if the package was not installed correctly in the first place. To correct the problem, install the upgrade package, restart PostgreSQL, verify the version, and then attempt the upgrade again.