In my understanding, mysql binlog can fully function as InnoDB's redo log.
So, after the binlog is enabled, why does InnoDB have to write a redo log at the same time instead of just switching to use the binlog? Doesn't this significantly slow down database write performance?
In addition to simplifying design and implementation, is there any benefit to doing this?
AFAIK, to enable two logs at the same time as the ACID compliance is guaranteed, the following problems will occur:
- Each log record with the same meaning must be written twice separately.
- Flush two logs each time a transaction or transaction group commits.
- To ensure consistency between the two log files, a complex and inefficient way such as XA (2PC) is used.
Therefore, all other products seem to use only one set of logs (SQL Server called Transaction log, ORACLE called redo log, and PostgreSQL called WAL) to do all the relevant work. Is it only MySQL that must open two sets of logs at the same time to ensure both ACID compliance and strong consistent master-slave replication?
Is there a way to implement ACID compliance and strong consistent semi-synchronous replication while only one of them is enabled?