Ad Widget

Collapse

database upgrade error on postgresql (color values)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • milprog
    Junior Member
    • Jul 2007
    • 27

    #1

    database upgrade error on postgresql (color values)

    Hi all

    I just tried to update my 1.4 installation to 1.6. The stock postgresql database upgrade procedure failed because "text style" color values were stored in my old database (it complained about having values too large for varchar(6) columns). I had to perform the SQL statements shown below before updating my database, then everything worked.

    Regards
    --Marcel

    update sysmaps_links set color_on='FF0000' where color_on='Red';
    update sysmaps_links set color_on='960000' where color_on='Dark Red';
    update sysmaps_links set color_on='00FF00' where color_on='Green';
    update sysmaps_links set color_on='009600' where color_on='Dark Green';
    update sysmaps_links set color_on='0000FF' where color_on='Blue';
    update sysmaps_links set color_on='000096' where color_on='Dark Blue';
    update sysmaps_links set color_on='FFFF00' where color_on='Yellow';
    update sysmaps_links set color_on='969600' where color_on='Dark Yellow';
    update sysmaps_links set color_on='00FFFF' where color_on='Cyan';
    update sysmaps_links set color_on='000000' where color_on='Black';
    update sysmaps_links set color_on='969696' where color_on='Gray';
    update sysmaps_links set color_on='FFFFFF' where color_on='White';
    update sysmaps_links set color_off='FF0000' where color_off='Red';
    update sysmaps_links set color_off='960000' where color_off='Dark Red';
    update sysmaps_links set color_off='00FF00' where color_off='Green';
    update sysmaps_links set color_off='009600' where color_off='Dark Green';
    update sysmaps_links set color_off='0000FF' where color_off='Blue';
    update sysmaps_links set color_off='000096' where color_off='Dark Blue';
    update sysmaps_links set color_off='FFFF00' where color_off='Yellow';
    update sysmaps_links set color_off='969600' where color_off='Dark Yellow';
    update sysmaps_links set color_off='00FFFF' where color_off='Cyan';
    update sysmaps_links set color_off='000000' where color_off='Black';
    update sysmaps_links set color_off='969696' where color_off='Gray';
    update sysmaps_links set color_off='FFFFFF' where color_off='White';
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Thanks for reporting this. Version of PostgreSQL?
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • milprog
      Junior Member
      • Jul 2007
      • 27

      #3
      I'm running 8.3.3 on x86_64-redhat-linux-gnu (CentOS 5.2), recompiled by myself with the --with-integer-datetimes option (this will presumably become the default for 8.4).

      My 1.4 zabbix frontend had several problems with queries (because of the fact that some implicit type casts from version<=8.2 are no longer installed by default in 8.3). To circumvent these problems, I added some of the typecasts described in http://people.planetpostgresql.org/p...reSQL-8.3.html as a workaround. These typecasts are still in place, hopefully these will become unneeded sometimes in future.

      Regards
      --Marcel

      Comment

      • Sasha
        Zabbix developer
        • Sep 2007
        • 60

        #4
        Fixed

        Thanks for your report!
        Problem fixed in rev. 6112.
        ZABBIX Developer
        Riga, Latvia

        Comment

        Working...