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

tsdb_history_pk_upgrade update for space and performance.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.2.6
    • Server (S)
    • Linux

      tsdb_history_pk_upgrade_*_compression scripts have:

      \copy (select * from history_old) TO '/tmp/history.csv' DELIMITER ',' CSV;

      and

      \copy temp_history FROM '/tmp/history.csv' DELIMITER ',' CSV

       

      A much better way to do it is:

      \copy (select * from history_old) TO PROGRAM 'gzip > /tmp/history.csv' DELIMITER ',' CSV;

      and

      \copy temp_history FROM PROGRAM 'zcat /tmp/history.csv' DELIMITER ',' CSV

       

      It's much faster, doesn't run the disk out of space, and just better all the way around so I offer it has suggestion to improve the software.

            nfrancys Francys Nivea (Inactive)
            akschu Matthew Schumacher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: