TiDB’s sync_log refers to whether TiDB uses synchronous mode when writing Binlog to ensure the durability of the write. In TiDB, sync_log is enabled by default, which means that synchronous mode is used when writing Binlog to ensure the durability of the write.
If you need to check or modify the sync_log setting, you can edit TiDB’s configuration file tidb.toml. You can find the following parameter in the configuration file:
[binlog]
# ...
sync-log = true # true means enabling synchronous mode for writing Binlog, false means disabling synchronous mode for writing Binlog
# ...
If sync_log is set to true, it means that synchronous mode for writing Binlog is enabled. If you want to disable synchronous mode for writing Binlog, you can set it to false.
After making the changes, save the configuration file and restart the TiDB service to make the configuration take effect. Please ensure to back up the original configuration before making any changes and proceed with caution.
We used to rely heavily on this configuration to run TiDB on low-spec servers. However, after the configuration was removed, customers were forced to upgrade their servers and experienced a better user experience. Overall, it’s still great~
In SQL, the show config command can only retrieve parameters for TiKV, TiDB, PD, and TiFlash. It cannot retrieve parameters for Pump, Drainer, or CDC. Use tiup show-config to see the configuration; if it is not found, it means the default configuration is being used, or you can find the config in the dashboard debugging section.