Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24955

Restore postgresql DB with timescaledb failed

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 7.0.5rc1, 7.2.0alpha1
    • 7.0.2
    • Server (S)
    • None
    • Debian 12
      Timescaldb version 2.15.3
      Postgresql version: 15.7
      Zabbix version: 7.0.2
    • S24-W42/43
    • 4

      Steps to reproduce:

      The following installaion procedure is used:
      Zabbix version 7.0.0 Timescaledb version 2.14.2
      https://www.zabbix.com/documentation/current/en/manual/installation/install_from_packages/debian_ubuntu

      and
      https://www.zabbix.com/documentation/current/en/manual/appendix/install/timescaledb

      Upgraded to zabbix version 7.0.2 and timescaledb version 2.15.3

      Implemented fix https://www.zabbix.com/documentation/7.0/en/manual/installation/known_issues#server-crash-with-postgresqltimescaledb-after-upgrade-from-7.0

       

      The backup is done with this command:
      sudo -u postgres pg_dump -Fp -C zabbix | gzip > zabbix.sql.gz
      The restore command used is:

      dropdb -U postgres zabbix
      gunzip -c zabbix.sql.gz | psql -U postgres -v ON_ERROR_STOP=1

       

      (This issue was also happening before the zabbix/timescaldb upgrade from 7.0.0 to 7.0.2)

      Result:

      Restore failed with:

      ERROR:  function base36_decode(text) does not exist
      LINE 1: CAST(base36_decode(substring(cuid FROM 2 FOR 8))/1000 AS int...
                   ^
      HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
      QUERY:  CAST(base36_decode(substring(cuid FROM 2 FOR 8))/1000 AS integer)
      CONTEXT:  PL/pgSQL function public.cuid_timestamp(character varying) line 3 at RETURN
      COPY _hyper_21_12_chunk, line 1: "clz86cezx0002d73nh7k5nkcd     \N      System  1722329214              0       47      \N      clz86cezv0001d73ncca9stuj  clz86cezx0003d73n..."

      Expected:

      Successfull restore

            askolmeisters Armands Arseniuss Skolmeisters
            Bijlenga Frits
            Team C
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 13h 20m
                13h 20m