Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29196

Request new system variable: binlog_keep_max

Details

    Description

      I have binary logs that are inconsistent in rate. That is, some days I write a tremendous amount to the log, and some days comparatively very little.

      I have a partition dedicated to binary logs, and I always want to keep a minimum of 3 days' worth of logs. That part is easily achievable by setting binlog_expire_logs_seconds (or its alias, expire_logs_days).

      But most of the time, I have plenty of disk space on that partition and would like to store far more than 3 days' worth of logs. Most of the time, setting it to 7 days works, but then every once in a while I run out of space.

      What I would like to do is set binlog_expire_logs_seconds to 3 days, and then have a new "binlog_keep_max" Boolean variable. Setting that to true would always allow the binary logs to fill up the partition, only deleting logs when the partition is full (but of course refusing to delete logs if they're newer than binlog_expire_logs_seconds). There's no reason NOT to have that partition be full of binary logs.

      Attachments

        Issue Links

          Activity

            Beautiful!

            xan@biblionix.com Xan Charbonnet added a comment - Beautiful!
            xan@biblionix.com Xan Charbonnet added a comment - - edited

            Or possibly even easier, at least for the user, would be a function that answers whether a particular log file is deletable or not. That way there's no room for error.

            xan@biblionix.com Xan Charbonnet added a comment - - edited Or possibly even easier, at least for the user, would be a function that answers whether a particular log file is deletable or not. That way there's no room for error.

            The solution here might end up being related to the solution for MDEV-29195.

            xan@biblionix.com Xan Charbonnet added a comment - The solution here might end up being related to the solution for MDEV-29195 .

            I believe this issue has been resolved via MDEV-31404, the implementation of binlog_space_limit.

            xan@biblionix.com Xan Charbonnet added a comment - I believe this issue has been resolved via MDEV-31404 , the implementation of binlog_space_limit.

            Thanks! Closing.

            serg Sergei Golubchik added a comment - Thanks! Closing.

            People

              monty Michael Widenius
              xan@biblionix.com Xan Charbonnet
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.