timescale / helm-charts

Configuration and Documentation to run TimescaleDB in your Kubernetes cluster
Apache License 2.0
261 stars 223 forks source link

[ISSUE]Default timescaledb extension version #345

Open throrin19 opened 2 years ago

throrin19 commented 2 years ago

Describe the bug I have installed the timescaledb-single-node chart with timescaledb 1.7. Now I'm running the 2.4 version but, When I create a new database, the timescaledb extension is installed directly on it but in 1.7 version. How to fix that to install directly the 2.4 version (or newest) ?

To Reproduce

Expected behavior Have the latest timescaledb version installed on the database

w3irdrobot commented 1 year ago

any movement on a solution for this? i have recently updated from chart version 0.13.1 to 0.33.1 which updated the timescale version from 2.8.0 to 2.9.1. however we are still seeing an a difference in version.

 default_version | installed_version 
-----------------+-------------------
 2.9.1           | 2.8.0
throrin19 commented 1 year ago

@w3irdrobot your problem is different. After timescaleDB upgrade, you have to upgrade the extension in all existing databases using this :

psql -U postgres -X

And, at first command :

ALTER EXTENSION timescaledb UPDATE;

You have to do this for all databases

xbarra commented 1 year ago

@throrin19 we managed to solve the issue.

It was happening to us too with docker compose (first 2.10.3, updated to 2.11.0 and new databases having 2.10.3).

The answer is the same you gave: you have to upgrade the extension in all existing databases.

I noticed in the install script used by timescale that it connected not only to the postgres db, but also to template1.

psql -U "${POSTGRES_USER}" template1 -f ${create_sql}

So if you connect to that db and update the extension there, the new databases you create will have the latest version.