maria-developers team mailing list archive
Mailing list archive
>>> Re: https://jira.mariadb.org/browse/MDEV-7145
>>> Delayed replication (a feature shipped in MySQL 5.6) has been a MariaDB
I have now pushed this into 10.2.
Ian, I have written some text for documentation below. Do you want to
integrate this with the existing documentation? I'm thinking you have a
better overview of what needs to be updated in other pages? Else, let me
know if you want me to put it into the documentation myself, or if you need
something more from me.
I still have the 10.1-based tree on my github, if someone wants to test it
out and 10.1 is more convenient than 10.2:
Delayed replication allows to specify that a replication slave should lag
behind the master by (at least) a specified amount of time. Before executing
an event, the slave will first wait, if necessary, until the given time has
passed since the event was created on the master. The result is that the
slave will reflect the state of the master some time back in the past.
Delayed replication is available starting from MariaDB 10.2.3.
Delayed replication is enabled using the MASTER_DELAY option to CHANGE
CHANGE MASTER TO master_delay=3600;
The delay is specified in seconds. A zero delay disables delayed
replication. The slave must be stopped when changing the delay value.
Three fields in SHOW SLAVE STATUS are associated with delayed replication:
1. SQL_Delay: This is the value specified by MASTER_DELAY in CHANGE MASTER
(or 0 if none).
2. SQL_Remaining_Delay. When the slave is delaying the execution of an event
due to MASTER_DELAY, this is the number of seconds of delay remaining before
the event will be applied. Otherwise, the value is NULL.
3. Slave_SQL_Running_State. This shows the state of the SQL driver threads,
same as in SHOW PROCESSLIST. When the slave is delaying the execution of an
event due to MASTER_DELAY, this fields displays: "Waiting until MASTER_DELAY
seconds after master executed event".