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

      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.

            zabbix.dev Zabbix Development Team
            akschu Matthew Schumacher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: