Ad Widget

Collapse

Help to check if my Postgres DB is running TimescaleDB correctly please

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • G0nz0uk
    Member
    • Apr 2021
    • 69

    #1

    Help to check if my Postgres DB is running TimescaleDB correctly please

    Hello,

    We are using Zabbix v7.4.8 with Postgres v18 and TSDB.

    How can I tell Postgres is using TSDB or the correct verison please?

    If I run I get this installed version:
    Code:
    sudo -u postgres psql -c "SELECT default_version, installed_version FROM pg_available_extensions WHERE name = 'timescaledb';"
    default_version | installed_version
    -----------------+-------------------
    2.24.0 |
    (1 row)
    However if I log into the Zabbix database
    Code:
    sudo -u postgres psql zabbix
    and run

    Code:
    SELECT * FROM pg_extension WHERE extname = 'timescaledb';
    I see 2.23.0
    Code:
    oid | extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
    -------+-------------+----------+--------------+----------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------
    22287 | timescaledb | 10 | 2200 | f | 2.23.0 | {22313,22314,22347,22364,22363,22388,22387,22407,2 2406,22440,22458,22460,22459,22485,22486,22572,225 91,22628,22645,22657,22669,22676,22687,22708,22720 ,22744,22755,22754} | {"","WHERE id >= 1","","","","","","","","","","","","","WHERE id >= 1000"," WHERE key <> 'uuid' ","","","","","","","","","","","",""}
    (1 row)

    Installed on the Ubuntu server:
    Code:
    dpkg -l | grep timescaledb
    hi timescaledb-2-loader-postgresql-18 2.24.0~ubuntu24.04-1801 amd64 The loader for TimescaleDB to load individual versions.
    hi timescaledb-2-postgresql-18 2.24.0~ubuntu24.04-1801 amd64 An open-source time-series database based on PostgreSQL, as an extension.
    ii timescaledb-toolkit-postgresql-18 1:1.22.0~ubuntu24.04 amd64 Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities, compatible with TimescaleDB and PostgreSQL
    ii timescaledb-tools 0.18.1~ubuntu24.04 amd64 A suite of tools that can be used with TimescaleDB.

    When the server was build we used the
    Code:
    sudo apt install -y timescaledb-2-postgresql-18
    Code:
    sudo timescaledb-tunetimescaledb-tune --version
    timescaledb-tune 0.18.1 (linux amd64)

    In the postgresql.conf I have
    Code:
    shared_preload_libraries = 'timescaledb'
    Test
    Code:
    sudo -u postgres psql -c "SHOW shared_preload_libraries;"
    shared_preload_libraries
    --------------------------
    timescaledb
    (1 row)

    To original install Timescale DB onto the Zabbix DB I ran:
    Code:
    echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbixcat /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix
    Maybe it all looks ok, but I'm a novice at Postgres and TSDB and help would be great.

    Thanks
  • Answer selected by G0nz0uk at 21-04-2026, 17:54.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4904

    If you upgraded TS version you may need to run also "ALTER EXTENSION timescaledb UPDATE;"

    If \dx will tell you the same version number as you have installed, then it should be OK.

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4904

      #2
      If you upgraded TS version you may need to run also "ALTER EXTENSION timescaledb UPDATE;"

      If \dx will tell you the same version number as you have installed, then it should be OK.

      Comment

      • G0nz0uk
        Member
        • Apr 2021
        • 69

        #3
        That did the trick thanks.

        Comment

        Working...