Ad Widget

Collapse

Postgresql upgrade notes for Primary Key

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perry811
    Junior Member
    • Jun 2017
    • 7

    #1

    Postgresql upgrade notes for Primary Key

    Sorry, i am not a DB guru here. Therefore, i very much rely on the notes provided by Zabbix official documentation for upgrade.
    When reviewing and testing the "Database upgrade to primary keys" procedures, i got the non-existing function error for the step below:

    select set_integer_now_func('history_uint', 'zbx_ts_unix_now', true);

    By querying the original database, i don't find the 'zbx_ts_unix_now' function. Then, i set up another postgresqlDB after running Zabbix6 'server.sql.gz' and 'timescaledb.sql' scripts, i still don't see the function 'zbx_ts_unix_now' . May i ask if i miss something?
    Then, i found a related bug has been filed under ZBX-18136. It was closed with 'Won't Do' status. May i ask then if 'set_integer_now_func()' is required for the upgrade primary-key notes?

    Any help will be appreciated!
  • tvtue
    Member
    • Sep 2012
    • 71

    #2
    Hi, did you find a solution for the problem? I think I am stuck at the same point. Here is my error:

    Code:
    zabbix=# INSERT INTO history_uint SELECT * FROM temp_history_uint ON CONFLICT (itemid,clock,ns) DO NOTHING;
    INSERT 0 978472335
    zabbix=#
    zabbix=#
    zabbix=# select set_integer_now_func('history_uint', 'zbx_ts_unix_now', true);
    ERROR: function "zbx_ts_unix_now" does not exist
    LINE 1: select set_integer_now_func('history_uint', 'zbx_ts_unix_now...
    ^
    zabbix=#
    Cheers
    Timo

    Comment

    Working...