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

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: