Details
-
New Feature
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
Original request:
We have a 130GB database, replicated to a backup cluster, and the binlog files consume 400GB of storage for a single day, without any option to reduce that to something more reasonable!
Implementation guidelines:
- Add variable to limit max binlog space (max-binlog-total-space and/or binlog_space_limit)
- Binlog size should be checked at during server start, binlog rotation, FLUSH LOGS, when writing to binary log or when max-binlog-total-size changes value.
- Add option --slave-connections-needed-for-purge with 1 as default. This is the minimum number of slaves that needs to be connected for binary logs to be deleted.
The number should normally be the number of minimum expected slaves. The binary logs will not be deleted until we have at least that many slaves attached and no one is using the to-be-deleted binary log.
For example assuming one is supposed to have 3 slaves connected to the sever. MariaDB will not delete binary logs based on size until all of them are connected at the same time and all of the slaves are requesting data from binary logs after the to-be-deleted one. - Add status variable 'Binlog_disk_use' that shows current binary log space usage.
Attachments
Issue Links
- causes
-
MDEV-33116 int MYSQL_BIN_LOG::real_purge_logs_by_size(ulonglong): Assertion `reclaimed_space == found_space' failed
- Closed
-
MDEV-33282 Assertion `(longlong) binlog_space_total >= 0' failed in MYSQL_BIN_LOG::real_purge_logs_by_size
- Closed
-
MDEV-33319 max_binlog_total_size and slave_connections_needed_for_purge require wrong permissions
- Closed
-
MDEV-33320 Assertion `(longlong) binlog_space_total >= 0' failed in MYSQL_BIN_LOG::real_purge_logs_by_size #2
- Closed
-
MDEV-34961 BINLOG_DISK_USE status variable is not documented
- Closed
- is duplicated by
-
MDEV-33029 Add a mechanism to limit total binlog size on disk
- Closed
- relates to
-
MDEV-11076 Make binlog and relay sizes dynamically configurable by "maximum size"
- Open
-
MDEV-29195 relay_log_purge variable not very useful
- Open
-
MDEV-29196 Request new system variable: binlog_keep_max
- Closed
-
MDEV-34897 Assertion `info->type == READ_CACHE || info->type == WRITE_CACHE' failed in reinit_io_cache on SET ... slave_connections_needed_for_purge
- Open
-
MDEV-35336 PURGE BINARY LOGS not working anymore again
- Needs Feedback