Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
None
Description
Right now we only have an automatic purge mechanism for replication binary logs based on time (expire_log_days / binlog_expire_log_seconds), but not on total size, so there's a risk of running out of disk space due to binary logs piling up.
It is also not easy to determine the total space taken by binlog files as we only have SHOW BINLOGS, but no INFORMATION_SCHEMA or PERFORMANCE_SCHEMA table providing the same information, so that it's not possible to apply aggregate functions like e.g.:
SELECT SUM(binlog_file_size) AS total_size FROM I_S.BINLOG_FILES;
which could be used from within a scheduled EVENT to issue PURGE BINLOG commands in case a certain size threshold is exceeded.
Adding a new setting like binlog_space_limit, after which the oldest binlog file would automatically be purged, would be nice as it would allow for more reliable file system capacity / quota planning,
We already have a similar relay_log_space_limit, but in case of the binlog(s) there should be a purge instead of a write stall.
Attachments
Issue Links
- duplicates
-
MDEV-31404 Implement binlog_space_limit
- Closed