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

2.0 database upgrade fails on pgsql>=9.0

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Installation (I)

      Description

      on postgresql 9.1 db patching to zabbix 2.0 schema fails with :
      language "plpgsql" already exists

      we change the language in two locations :

      hosts.sql:CREATE LANGUAGE 'plpgsql';
      hosts.sql:DROP LANGUAGE 'plpgsql';
      node_cksum.sql:CREATE LANGUAGE 'plpgsql';
      node_cksum.sql:DROP LANGUAGE 'plpgsql';

      pgsql 9.0 release notes ( http://www.postgresql.org/docs/9.0/static/release-9-0.html ) say :
      "PL/pgSQL is now installed by default"

      our approach of unconditional adding & removing of plpgsql might have a side effect where users with 9.0 were supposed to have plpgsql, but after zabbix patch they do not have it anymore.
      (or zabbix user might not have permissions to drop the language and that would error out as well. to be tested)

      potential solution is suggested at http://wiki.postgresql.org/wiki/CREATE_OR_REPLACE_LANGUAGE - but it probably should be modified to add language only if it's missing, and remove it only if we added it

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            richlv richlv
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: