#include <db.h> int DB_SITE->set_config(DB_SITE *site, u_int32_t which, u_int32_t value);
The DB_SITE->set_config()
method configures
a replication site.
The DB_SITE->set_config()
method returns a non-zero error value on failure and 0 on success.
This parameter must be set to one of the following values:
Specifies that a remote site may be used as a "helper" when the local site is first joining the replication group. Once the local site has been established as a member of the group, this setting is ignored.
Specifies that this site should create the initial membership database contents, defining a "group" of just the one site, rather than trying to join an existing group when it starts for the first time.
This setting can only be applied to the local site.
Specifies that the site is already part of an existing group. This setting causes the site to be upgraded from a previous version of BDB. All sites in the legacy group must specify this setting for themselves (the local site) and for all other sites currently existing in the group. Once the upgrade has been completed, this setting is no longer required.
Specifies that this site is the local site within the replication group. The application must identify exactly one site as the local site in this way, before calling the DB_ENV->repmgr_start() method.
Specifies that the site may be used as a target for "client-to-client" synchronization messages. This setting is ignored if it is specified for the local site.
The DB_SITE->set_config()
method may fail and return one of the following non-zero errors: