
As TimescaleDB has quite a lot minor version releases, you often come to a point that you have to update the TimescaleDB version you’re using.
Before updating the version, always check which TimescaleDB versions are compatible with your PostgreSQL version. If your TimescaleDB version is too new, you will first have to upgrade your PostgreSQL server. A great page to visit and check the compatibility is this one: https://docs.tigerdata.com/self-hosted/latest/upgrades/minor-upgrade/
First let’s check the current version of PostgreSQL:
su - postgres
psql -X -d zabbix -c "SELECT version();"
This should give an output like this:
-------------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 16.10 (Ubuntu 16.10-1.pgdg24.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, 64-bit
(1 row)
After this check the current version of TimescaleDB:
psql -X -d zabbix -c "\dx timescaledb;"
This should give an output like this:
List of installed extensions
Name | Version | Schema | Description
-------------+---------+--------+---------------------------------------------------------------------------------------
timescaledb | 2.21.3 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
(1 row)
Before upgrading the installed TimescaleDB extension for your Zabbix database, you’ll have to check which extension version is available. This can be done with the following SQL-query:
psql -X -d zabbix -c "SELECT default_version, installed_version FROM pg_available_extensions WHERE name = 'timescaledb';"
The output should be something like this:
default_version | installed_version
-----------------+-------------------
2.22.0 | 2.21.3
(1 row)
When all is great, you can perform the TimescaleDB extension upgrade. Type the exact version in which was displayed above in the column default_version:
psql -X -d zabbix -c "ALTER EXTENSION timescaledb UPDATE TO '2.22.0';"
After this is done, check which version of the TimescaleDB extension you’re running right now:
psql -X -d zabbix -c "\dx timescaledb;"
Now you can see the new version of the extension is activated!
Name | Version | Schema | Description
-------------+---------+--------+---------------------------------------------------------------------------------------
timescaledb | 2.22.0 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
(1 row)
As the releases of TimescaleDB are very often, Zabbix server sometimes will fail to start as you’re running a version which isn’t supported by Zabbix. To run Zabbix server on a bleeding edge version of the TimescaleDB extension you will have to change a setting in your zabbix_server.conf, this can be set like this:
AllowUnsupportedDBVersions=1
After you’ve performed all the previous steps, you’re running a new TimescaleDB extension for your Zabbix server!