In the master-slave configuration of MySQL, execute show slave status on the slave to view the slave status. Today, we suddenly find that the output contains relay_master_log_file and exec_master_log_pos, I was not impressed before (maybe I didn't notice :(). I thought it was strange that I finally understood the meaning of a search.
See how MySQL manual explains:
Exec_master_log_pos: the position of the last event executed by the SQL thread from the master's binary log (relay_master_log_file ). (relay_master_log_file, exec_master_log_pos) in the master's binary log corresponds to (relay_log_file, relay_log_pos) in the relay log.
Literally, (relay_master_log_file, exec_master_log_pos) and (relay_log_file, relay_log_pos) correspond to the positions of the statements being executed in the SQL process in slave, it indicates the synchronization status between the slave and the master. When relay_master_log_file and master_log_file in slave are the same and read_master_log_pos and exec_master_log_pos are identical, it indicates that slave and master are in the completely synchronous state.
Now that you have (relay_master_log_file, exec_master_log_pos), you can indicate the synchronization status. What else do you need (relay_log_file, relay_log_pos? I think (relay_log_file, relay_log_pos) is for the program to view, record the execution points in relay log, and (relay_master_log_file, exec_master_log_pos) can be shown to people, it clearly shows the synchronization status between the master and slave.