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

slave_connections_needed_for_purge prevents independent machine from purging binary logs

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Hide
      Revert the default for `@@slave_connections_needed_for_purge` to 0 to match 10.11’s automatic binlog purge policy; instead, add a one-time warning about this automatic purge and the 0 default’s lack of retention when a slave connects but `@@slave_connections_needed_for_purge` is left at the default.
      Show
      Revert the default for `@@slave_connections_needed_for_purge` to 0 to match 10.11’s automatic binlog purge policy; instead, add a one-time warning about this automatic purge and the 0 default’s lack of retention when a slave connects but `@@slave_connections_needed_for_purge` is left at the default.
    • Q3/2026 Replic. Development, Q4/2026 Replic. Maintenance

    Description

      With variable slave_connections_needed_for_purge, a primary machine needs to check replicas before purging binary logs. If a replica is not there and the machine is a standalone machine, it just does not purge the binary logs and ignores log_expire_days variable and binary logs fills the disk space.
      Binary log purge is not happening due to the default behavior of `slave_connections_needed_for_purge` to `1` on a standalone server.

      The default value for slave_connections_needed_for_purge should be changed to 0 (i.e. assume the server will be standalone); then if a slave connects, log a warning so users know to change the value.

      For reference, the original solution proposed when the JIRA was created
      _If the MariaDB is able to determine whether we are a standalone installation and if so set default value slave_connections_needed_for_purge to 0.
      The default of 1 is not appropriate unless we are in fact part of a replica group._

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              rohit.kumar Rohit Kumar
              Kristian Nielsen Kristian Nielsen
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1d 2h 10m Original Estimate - 1d 2h 10m
                  1d 2h 10m
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1d 4h 50m
                  1d 4h 50m

                  Git Integration

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