Bug #66733 Need to be able to set binary_log_space_limit

Submitted: 7 Sep 2012 13:45 Modified: 4 Jun 2013 1:59
Reporter: Morgan Tocker Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any

[7 Sep 2012 13:45] Morgan Tocker
Description:
It's possible to set a maximum amount of bytes for the relay log: relay_log_space_limit.  The binary log however, can only be set in days (expire_logs_days).  This is not always useful to me, since storage is provision in bytes - and depending on what I am doing, I might accidentally create far more binary logs than I expected (suddenly chose to reload a mysqldump file etc).

How to repeat:
N/A with a feature request, but:

- Use row based replication and a bulk insert of data
- Import a MySQLdump or otherwise modify a lot of data at once.
- Watch what happens when you run out of space.

Suggested fix:
Keep expire_logs_days, but add configuration variable: binary_log_space_limit.  Both limits should apply at once.
[7 Sep 2012 17:41] Sveta Smirnova
Thank you for the reasonable feature request.
[4 Jun 2013 1:59] Morgan Tocker
An alternative fix is this one in Percona Server: http://www.percona.com/doc/percona-server/5.6/flexibility/max_binlog_files.html#maximum-bi...
[29 Nov 2013 19:39] Simon Mudd
A large import from one system to another makes the management of the log file space which I have in a separate filesystem (which is smaller than the filesystem holding $datadir) a nuisance.

A *dynamic* binary_log_space_limit setting would make that a non-issue.
[12 Feb 2014 8:12] Simon Mudd
This is still an issue in 5.7.

relay_log_space_limit is still not useful because it can not be set dynamically. So having the value is fine but I may resize the partition where the logs are written or I my want to control how many relay logs are written and not having this configuration setting being a dynamic value severely limits its usefulness. 

Planning on sizes is great but some servers I run have a MySQL uptime of over a year, and the disks have been extended "under the server" without shutting it down. So having a static setting here is really useless (I've never used it because of this.)

Given 5.7 has many new dynamic replication configuration settings making this variable a dynamic configuration setting would be a very useful change.
[30 May 2019 9:34] Przemyslaw Malkowski
Morgan, the max_binlog_files in Percona Server was obviously still not an ideal solution. 
It was recently replaced with a better and consistent with relay_log_space_limit one - the binlog_space_limit https://www.percona.com/doc/percona-server/5.7/flexibility/max_binlog_files.html#binlog_sp...

I hope it will be implemented in upstream as well.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.064 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.