Managing binary log disk space¶
It is a challenge to control how much disk space is used by the binary logs. The size of a binary log can vary because a single transaction must be written to a single binary log and cannot be split between multiple binary log files.
binlog_space_limit¶
Attribute | Description |
---|---|
Uses the command line | Yes |
Uses the configuration file | Yes |
Scope | Global |
Dynamic | No |
Variable type | ULONG_MAX |
Default value | 0 (unlimited) |
Maximum value - 64-bit platform | 18446744073709547520 |
This variable places an upper limit on the total size in bytes of all binary logs. When the limit is reached, the oldest binary logs are purged until the total size is under the limit or only the active log remains.
The default value of 0
disables the feature. No limit is set on the log space. The binary logs accumulate indefinitely until the disk space is full.
Example¶
Set the binlog_space_limit
to 50 GB in the my.cnf
file:
[mysqld]
...
binlog_space_limit = 50G
...
Get expert help¶
If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.