Each replicated database is replicated from a master to a slave version of that database. Initially there is no replication; a master database must be created before it can be replicated. The database may, of course, be empty when replication starts. On the other hand, replication does not need to be specified immediately after the database is created; it can be initiated at any time after the database is created.
Before you start replication, you must shut down the master database and then copy the database to the slave location. Follow these steps to start replication:
See the
After replication has been started, the slave
is ready to receive logged operations from the master. The master can now
continue to process transactions. From this point on, the master forwards all
logged operations to the slave in chunks. The slave repeats
these operations by applying the contents of the
While replication is running, neither the slave or the master database is permitted to be shut down. Replication must be stopped before you can shut down either the slave or the master database. There is one exception to this rule: if the entire system is shut down, the peer that is shut down notifies the other replication peer that replication is stopped.
If you install jar files on the master system while replication is running,
the same jars are not automatically installed on the slave. But because the
transaction log information sent to the slave system includes the jar file
installation, the slave database has a record of the jar files, even though they
are not actually there. Therefore, you must install the jar files on the former
slave after a failover by calling either
If the jar files must be available to clients immediately after a failover, you must stop replication and then start replication over again from the beginning, so that the slave database will have the same jar files as the master.