Outdated Version

You are viewing an older version of this section. View current production version.

CONTINUE REPLICATING

Resume replicating the database after pausing via PAUSE REPLICATING.

Same Master: To resume replication from the same master, use the following syntax:

CONTINUE REPLICATING db_name [ASYNC | SYNC]

New Master: To resume replication from a new master, use the following syntax:

CONTINUE REPLICATING db_name [ASYNC | SYNC] FROM master_user[:'master_password']@master_host[:master_port][/master_db_name] [FORCE]
Info

The keyword FORCE can be used to convert an existing ONLINE database db_name into a replica. It will only perform basic consistency checks to ensure that snapshots and logs of db_name and remote master_db_name match each other. The log of db_name needs to be a prefix of the log on master_db_name. You can verify this property manually by performing a binary file comparison (using tools like cmp or md5sum) between the corresponding database snapshot and log files in the primary’s and secondary’s data directories. MemSQL writes per-transaction checksums in its log files and this mechanism will abort replication in most of the cases of using CONTINUE ... FORCE with diverged log files, but not always, in which case the secondary database can become inconsistent with the primary database.

Notes

  • The long form of CONTINUE REPLICATING can be used to re-point a replica from one master to another. See “Replication Failover” for more details on failover and using the CONTINUE REPLICATING command.
  • The optional ASYNC and SYNC keywords can be used to continue replicating as an asynchronous or synchronous replica, respectively.
  • This command can be run on any MemSQL node (see Node Requirements for MemSQL Commands).
Info

This MemSQL feature is only available in MemSQL Enterprise Edition. MemSQL Enterprise Edition includes 24x7 support and several enterprise-only features for critical deployments. For more information about MemSQL Community and MemSQL Enterprise, see the MemSQL Editions page.

Example

memsql> CONTINUE REPLICATING ExampleDatabase;
Query OK, 1 row affected (0.26 sec)