Ad Widget

Collapse

Do I need to fix "database is not upgraded to use double precision values"?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andy Afanasyev
    Junior Member
    • Oct 2018
    • 8

    #1

    Do I need to fix "database is not upgraded to use double precision values"?

    Just upgraded 4.4.10 to 5.0.5 in my test lab. As I can understand this is not critical error but warning. When I may face problems because of it? And what kind of problems? Asking because patching database in my configuration leads to almost 2 hours of downtime and it's not acceptable right now.
    Database version: PostgreSQL 9.6
    Last edited by Andy Afanasyev; 16-11-2020, 12:40.
  • NilsA
    Senior Member
    • Sep 2020
    • 102

    #2
    This fixed it for me: https://bestmonitoringtools.com/upgr...ecision_values
    This seems to be a normal problem after upgrading to Zabbix 5.x. There's no db restart needed, so no downtime.

    Comment

    • Andy Afanasyev
      Junior Member
      • Oct 2018
      • 8

      #3
      Originally posted by NilsA
      This fixed it for me: https://bestmonitoringtools.com/upgr...ecision_values
      This seems to be a normal problem after upgrading to Zabbix 5.x. There's no db restart needed, so no downtime.
      Thank you for your answer. I know how to fix it and I already fixed it in my lab and it lasted almost 2 hours due to database size. And while alter table statements were working zabbix server couldn't work with history tables as I can understand. Triggers were not working too as I remember. And I saw suggestions that we need to stop zabbix server to apply the patch correctly.

      So my question was: "Do I really need to patch database?"

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1782

        #4
        I did this double precision change the first time ever today for a small 7 GB partitioned MariaDB 10.5.15 database on a consumer-grade NAS disk. It completed immediately. I mean, running the double.sql commands (as instructed in https://www.zabbix.com/documentation...c-float-values) did not take any time at all. I even repeated this on another temporary server to see that it really did something. "show create table history/trends" (before and after the change) showed that double(16,4) was changed to double, so I guess it did it.

        I wonder how big the database should be that the double.sql change will start taking any significant amount of time.

        Markku

        Comment


        • ivanmirandaf
          ivanmirandaf commented
          Editing a comment
          Resolveu pra mim, obrigado
      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #5
        Upgrade to use primary keys (as pointed in one of previous links), that takes time, as it contains export and import. But double precision script is just "alter table".... that (as long as I understand) does not change data, so it runs quickly.

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1782

          #6
          I wonder why they have "The patch will alter data columns of history and trends tables, which usually contain lots of data, therefore it is expected to take some time to complete. Since the exact estimate depends on server performance,​ database management system configuration and version, and it cannot be predicted, it is recommended to first test the patch outside the production environment" in the docs... (this is about the double precision change in 5.0.0 upgrade notes as linked above)

          Markku

          Comment


          • cyber
            cyber commented
            Editing a comment
            My claims about "alter table" not affecting may as well be bogus.. I am not DB person..
        • Andy Afanasyev
          Junior Member
          • Oct 2018
          • 8

          #7
          Database size was around 800Gb. Now I know that main cause of slow database patching was active zabbix server. Patching with running zabbix server = 1 hour and 40 minutes, patching with stopped zabbix server = 3 minutes.

          Comment

          Working...