Oracle MySQL implemented binary log expiration period in seconds via binlog_expire_logs_seconds variable and expire_logs_days is deprecated in MySQL 8.
It would be nice to have similar option for MariaDB Server. Expiring binary logs within seconds is extremely useful in high volume writes on master and where disk space is limited option.
Attachments
Issue Links
causes
MDEV-27039Trying to lock mutex ... when the mutex was already locked | SIGABRT in safe_mutex_lock | Hangs
For the documentation, the patch 49ff2cbff4
1. changes the type of expire_log_days to double to allow factional part of the whole day.
Backward compatible setting to an integer value is preserved (no need any post-upgrade actions)
2. adopts from the upstream binlog_expire_logs_seconds as an alias to expire_log_days so
the two variables show the same value just in different units and formats.
The changes to --help for expire_log_days can be seen in the patch:
"If non-zero, binary logs will be purged after expire_logs_days "
"days; possible purges happen at startup and at binary log rotation",
+ "days; It and binlog_expire_logs_seconds are aliases, such that "
+ "changes in one are converted into the other, presentable as a "
+ "decimal value with 1/1000000 of the day precision; possible "
+ "purges happen at startup and at binary log rotation",
The upstream new binlog_expire_logs_seconds is described as
+ "If non-zero, binary logs will be purged after "
+ "binlog_expire_logs_seconds seconds; It and expire_logs_days are "
+ "aliases, such that changes in one are converted into the other. "
+ "Possible purges happen at startup and at binary log rotation.",
the type is double,
the valid range is from 0 to 99*86400 seconds.
Values from 1 to 11 are rounded to zero 0.000000 of expire_log_days.
Andrei Elkin
added a comment - For the documentation, the patch 49ff2cbff4
1. changes the type of expire_log_days to double to allow factional part of the whole day.
Backward compatible setting to an integer value is preserved (no need any post-upgrade actions)
2. adopts from the upstream binlog_expire_logs_seconds as an alias to expire_log_days so
the two variables show the same value just in different units and formats.
The changes to --help for expire_log_days can be seen in the patch:
"If non-zero, binary logs will be purged after expire_logs_days "
"days; possible purges happen at startup and at binary log rotation",
+ "days; It and binlog_expire_logs_seconds are aliases, such that "
+ "changes in one are converted into the other, presentable as a "
+ "decimal value with 1/1000000 of the day precision; possible "
+ "purges happen at startup and at binary log rotation",
The upstream new binlog_expire_logs_seconds is described as
+ "If non-zero, binary logs will be purged after "
+ "binlog_expire_logs_seconds seconds; It and expire_logs_days are "
+ "aliases, such that changes in one are converted into the other. "
+ "Possible purges happen at startup and at binary log rotation.",
the type is double,
the valid range is from 0 to 99*86400 seconds.
Values from 1 to 11 are rounded to zero 0.000000 of expire_log_days .
I suggest not using the word "alias" in the descriptions, as this implies that they are the same, and if a user doesn't look beyond that, they could end up specifying the wrong units. You could replace it with the word "linked", or "forms of aliases".
Ian Gilfillan
added a comment - I suggest not using the word "alias" in the descriptions, as this implies that they are the same, and if a user doesn't look beyond that, they could end up specifying the wrong units. You could replace it with the word "linked", or "forms of aliases".
For the documentation, the patch 49ff2cbff4
1. changes the type of expire_log_days to double to allow factional part of the whole day.
Backward compatible setting to an integer value is preserved (no need any post-upgrade actions)
2. adopts from the upstream binlog_expire_logs_seconds as an alias to expire_log_days so
the two variables show the same value just in different units and formats.
The changes to --help for expire_log_days can be seen in the patch:
The upstream new binlog_expire_logs_seconds is described as
+ "If non-zero, binary logs will be purged after "
+ "binlog_expire_logs_seconds seconds; It and expire_logs_days are "
+ "aliases, such that changes in one are converted into the other. "
+ "Possible purges happen at startup and at binary log rotation.",
the type is double,
the valid range is from 0 to 99*86400 seconds.
Values from 1 to 11 are rounded to zero 0.000000 of expire_log_days.