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

    • Bug
    • Status: Confirmed (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 11.4, 11.8, 12.3
    • 11.4, 11.8, 12.3
    • Replication
    • None
    • Q3/2026 Replic. Development

    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
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 1d 2h 10m Original Estimate - 1d 2h 10m
                  1d 2h 10m
                  Remaining:
                  Time Spent - 0.75h Remaining Estimate - 2d
                  2d
                  Logged:
                  Time Spent - 0.75h Remaining Estimate - 2d
                  0.75h

                  Git Integration

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