ALTER ASYNC REPLICATION

The ALTER ASYNC REPLICATION statement modifies the status and parameters of an asynchronous replication instance.

Syntax

ALTER ASYNC REPLICATION <name> SET (option = value [, ...])

Parameters

  • name — a name of the asynchronous replication instance.

  • SET (option = value [, ...]) — asynchronous replication parameters:

    • STATE — the state of asynchronous replication. This parameter can only be used in combination with the FAILOVER_MODE parameter (see below). Valid values are:

    • FAILOVER_MODE — the mode for changing the replication state. This parameter can only be used in combination with the STATE parameter. Valid values are:

      • FORCE — forced failover.
  • Authentication settings for the source database (one of the following):

    • Using a token:

      • TOKEN_SECRET_PATH — the secret that contains the token.
    • Using a username and password:

      • USER — the username.
      • PASSWORD_SECRET_PATH — the secret that contains the password.
    • Using a delegated service account:

      • SERVICE_ACCOUNT_ID — the identificator of the service account.
      • INITIAL_TOKEN_SECRET_PATH — the secret that contains the account's token. It is used for initial authentication.

Examples

The following statement forces the asynchronous replication process to complete:

ALTER ASYNC REPLICATION my_replication SET (STATE = "DONE", FAILOVER_MODE = "FORCE");

The following query changes the secret:

ALTER ASYNC REPLICATION my_replication SET (TOKEN_SECRET_PATH = "my_token");

See also

Previous