Replication set management v5
Replication management and DDL
With the exception of bdr.alter_node_replication_sets
, the following
functions are considered to be DDL
. DDL replication and global locking
apply to them, if that's currently active. See DDL replication.
bdr.create_replication_set
This function creates a replication set.
Replication of this command is affected by DDL replication configuration, including DDL filtering settings.
Synopsis
Parameters
set_name
— Name of the new replication set. Must be unique across the PGD group.replicate_insert
— Indicates whether to replicate inserts into tables in this replication set.replicate_update
— Indicates whether to replicate updates of tables in this replication set.replicate_delete
— Indicates whether to replicate deletes from tables in this replication set.replicate_truncate
— Indicates whether to replicate truncates of tables in this replication set.autoadd_tables
— Indicates whether to replicate newly created (future) tables to this replication setautoadd_existing
— Indicates whether to add all existing user tables to this replication set. This parameter has an effect only ifautoadd_tables
is set totrue
.
Notes
By default, new replication sets don't replicate DDL or PGD administration function calls. See DDL filters for how to set up DDL replication for replication sets. A preexisting DDL filter is set up for the default group replication set that replicates all DDL and admin function calls. It's created when the group is created but can be dropped in case you don't want the PGD group default replication set to replicate DDL or the PGD administration function calls.
This function uses the same replication mechanism as DDL
statements. This means
that the replication is affected by the DDL filters
configuration.
The function takes a DDL
global lock.
This function is transactional. You can roll back the effects with the
ROLLBACK
of the transaction. The changes are visible to the current
transaction.
bdr.alter_replication_set
This function modifies the options of an existing replication set.
Replication of this command is affected by DDL replication configuration, including DDL filtering settings.
Synopsis
Parameters
set_name
— Name of an existing replication set.replicate_insert