Marco Dickert - evolver group via discuss <discuss@lists.mariadb.org>
writes:

> tl;dr: With slave_connections_needed_for_purge=1 (the default), binlogs are 
> not
> auto-purged if no slave is connected. I’m wondering why this is the default
> behavior.

> I understand why setting this to 1 can be useful in replication setups [2], 
> but
> I’m surprised it’s the default. I would assume most MariaDB deployments are 
> not
> replication setups, so auto-purging being disabled by default seems
> counterintuitive.

Yes.

> Has anyone else run into this, and is there a rationale for keeping this as 
> the
> default?

Well, I raised this concern in my review of the feature. There is some
discussion of it in the review mailing list thread:

  
https://lists.mariadb.org/hyperkitty/list/develop...@lists.mariadb.org/message/EXIBNZ6PY4FQNBIUWJXS7SHKBMJWFPQU/
  
https://lists.mariadb.org/hyperkitty/list/develop...@lists.mariadb.org/message/OUMOHBRP56JIUSHFOQJNPF2AI2RYVYVB/

A later follow-up patch tried to address some of the problems this default
causes, but the problem you mention here remains:

  
https://lists.mariadb.org/hyperkitty/list/comm...@lists.mariadb.org/message/2FXXPRGD7FMXEPPMVE763O7N6HDUANAB/

So the issue was considered at least, but if there is a valid rationale for
keeping the default of 1 is still debatable I suppose.

One thing that plays into this issue is that the server does not have any
configuration or information about if it is a master server in a replication
setup or not. It only knows about currently connected slaves, if any. This
makes it harder to distinguish in the code between "No replication is used
and configured" and "Replication is configured, but all slaves are currently
disconnected".

Hope this helps,

 - Kristian.
_______________________________________________
discuss mailing list -- discuss@lists.mariadb.org
To unsubscribe send an email to discuss-le...@lists.mariadb.org

Reply via email to