Bug #46435 compress binary files
Submitted: 28 Jul 2009 16:54
Reporter: Lig Isler-Turmelle Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:6.0 OS:Any
Assigned to: Luis Soares CPU Architecture:Any

[28 Jul 2009 16:54] Lig Isler-Turmelle
In large systems the binary file can become quite large over short periods of time.  It would be nice to have the ability for the server to automatically compress the binary logs to save space and work with those compressed logs.  Perhaps make an option so that mysqld can write compressed binlogs and make a flag in the Binlog header and enable MySQL replication and the mysqlbinlog command to read compressed binlogs. 

How to repeat:

Suggested fix:
allow for the generation and ability to work with compressed files.
[1 Oct 2009 16:44] Tyler MacDonald
I'd like to see support for this as well -- in addition to saving on disk space, it would be an excellent option to help balance CPU usage vs. IOWAIT on high-throughput systems.
[29 Oct 2009 17:28] Luis Soares
BUG#48396 seems duplicate of this one.
[10 Oct 2014 8:05] Daniƫl van Eeden
This might also make sense for reducing the amount of replication traffic. Especially with RBR.

It can also help to reduce the size of backups (MEB makes a backup of binlogs by default).

Supporting multiple compression formats (lz4, zlib, lzma) similar to MEB might be a good solution.

Another solution might be to supply a command to archive/restore binlogs:
binlog_archive_command = pbzip2
binlog_restore_command = pbunzip2

This might also be a command which moves the old binlogs to different storage tier, but without losing the ability for the server to fetch them when a slave requests them.
[7 Apr 2015 7:21] feng guo
Hope binlog compression feature coming soon~
[4 Aug 2015 8:04] zhou choury
We have implemented it. Further detail can be seen by