Commit 46bab4b7 authored by Julien Muchembled's avatar Julien Muchembled

erp5.mariadb: leave unsafe performance settings as comments if disabled

It is useful to temporary enable such settings while preparing an instance.
parent 627ed397
...@@ -201,7 +201,7 @@ md5sum = c4c42d06c63d33de703fc03415e34d84 ...@@ -201,7 +201,7 @@ md5sum = c4c42d06c63d33de703fc03415e34d84
[template-my-cnf] [template-my-cnf]
< = download-base < = download-base
filename = my.cnf.in filename = my.cnf.in
md5sum = dc7c5db29474f7c65a696586734a5c52 md5sum = 774b0e5d167b75a0ad8ead45fa2eadf6
[template-mariadb-initial-setup] [template-mariadb-initial-setup]
< = download-base < = download-base
......
...@@ -54,15 +54,16 @@ innodb_locks_unsafe_for_binlog = 1 ...@@ -54,15 +54,16 @@ innodb_locks_unsafe_for_binlog = 1
log_bin = {{ log_bin }} log_bin = {{ log_bin }}
{% set binlog_expire_days = parameter_dict['binlog-expire-days'] -%} {% set binlog_expire_days = parameter_dict['binlog-expire-days'] -%}
{% if binlog_expire_days > 0 %}expire_logs_days = {{ binlog_expire_days }}{% endif %} {% if binlog_expire_days > 0 %}expire_logs_days = {{ binlog_expire_days }}{% endif %}
{% endif -%} {% endif %}
# Some dangerous settings you may want to uncomment temporarily
# if you only want performance or less disk access.
{# Note: strictly check equality to one, as a last line of defense against users not reading the doc. -#} {# Note: strictly check equality to one, as a last line of defense against users not reading the doc. -#}
{% if parameter_dict['relaxed-writes'] -%} {% set x = '' if parameter_dict['relaxed-writes'] else '#' -%}
innodb_flush_log_at_trx_commit = 0 {{x}}innodb_flush_log_at_trx_commit = 0
innodb_flush_method = nosync {{x}}innodb_flush_method = nosync
innodb_doublewrite = 0 {{x}}innodb_doublewrite = 0
sync_frm = 0 {{x}}sync_frm = 0
{% endif -%}
# Force utf8 usage # Force utf8 usage
collation_server = utf8_unicode_ci collation_server = utf8_unicode_ci
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment