DB_ENV->repmgr_start API Ref

#include <db.h>

int DB_ENV->repmgr_start(DB_ENV *env, int nthreads, u_int32_t flags);


Description: DB_ENV->repmgr_start

The DB_ENV->repmgr_start method starts the replication manager.

There are two ways to build Berkeley DB replication applications: the most common approach is to use the Berkeley DB library "replication manager" support, where the Berkeley DB library manages the replication group, including network transport, all replication message processing and acknowledgment, and group elections. Applications using the replication manager support generally make the following calls:

  1. Call DB_ENV->repmgr_set_local_site to configure the local site in the replication group.

  2. Call DB_ENV->repmgr_add_remote_site to configure the remote site(s) in the replication group.

  3. Call DB_ENV->repmgr_set_ack_policy to configure the message acknowledgment policy which provides the replication group's transactional needs.

  4. Call DB_ENV->rep_set_priority to configure the local site's election priority.

  5. Call DB_ENV->repmgr_start to start the replication application.

For more information on building replication manager applications, please see the "Replication Manager Getting Started Guide" included in the Berkeley DB documentation.

Applications with special needs (for example, applications using network protocols not supported by the Berkeley DB replication manager), must perform additional configuration and call other Berkeley DB replication methods. For more information on building advanced replication applications, please see the "Advanced Replication Applications Guide" included in the Berkeley DB documentation.

The DB_ENV->repmgr_start method may not be called before the DB_ENV->open method is called.

The DB_ENV->repmgr_start method returns a non-zero error value on failure and 0 on success.

Parameters
flags nthreads


Class DB_ENV
See Also Replication and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.