8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:03:03 +01:00

Documentation

This commit is contained in:
Dmitry Yemanov 2020-04-15 16:39:17 +03:00
parent 25f5bf7b6a
commit 2231e6e187
2 changed files with 50 additions and 1 deletions

View File

@ -30,7 +30,24 @@ All replication errors and warnings \(e.g. detected conflicts\) are written into
Replication is configured using a single configuration file: replication.conf. It allows to define global settings as well as per-database settings. All the possible options are listed inside replication.conf, descriptions are provided as comments there. For per-database configuration, full database name must be specified \(aliases or wildcards are not allowed\) inside the {database} section.
Tables to be replicated can be customized using two settings: include\_filter and exclude\_filter. They are regular expressions that are applied to table names and define rules for inclusion table\(s\) into the replication set or excluding them from the replication set.
Inside the database, replication should be enabled via the DDL command:
ALTER DATABASE ENABLE PUBLICATION
Also, the replication set (aka publication) should be defined. It includes tables that should be replicated. This is also done via the DDL command:
-- to replicate all tables (including the ones created later):
ALTER DATABASE ADD ALL TO PUBLICATION
-- to replicate specific tables:
ALTER DATABASE ADD TABLE T1, T2, T3 TO PUBLICATION
Tables may later be excluded from the replication set:
-- to disable replication of all tables (including the ones created later):
ALTER DATABASE DROP ALL FROM PUBLICATION
-- to disable replication of specific tables:
ALTER DATABASE DROP TABLE T1, T2, T3 FROM PUBLICATION
Tables enabled for replicated can be additionally filtered using two settings in the configuration file: include\_filter and exclude\_filter. They are regular expressions that are applied to table names and define rules for inclusion table\(s\) into the replication set or excluding them from the replication set.
Synchronous replication can be turned on using the sync\_replica setting \(multiple entries are allowed\). It must specify a connection string to the replica database, prefixed with username/password. In SuperServer and SuperClassic architectures, replica database is being internally attached when the first user gets connected to the master database and detached when the last user disconnects from the master database. In Classic Server architecture, every server process keeps an active connection to the replica database.

View File

@ -569,3 +569,35 @@ suppoprted now. Example:
GRANT ALL ON PLG$SRP_VIEW TO SYSTEM PRIVILEGE USER_MANAGEMENT
Grants all rights to view (used in SRP management plugin) to users having USER_MANAGEMENT privilege.
22) Added replication control clauses to ALTER DATABASE statement.
(Dmitry Yemanov)
ALTER DATABASE {ENABLE | DISABLE} PUBLICATION
Enables or disabled replication. The change is applied immediately.
ALTER DATABASE ADD ALL TO PUBLICATION
Enables replication for all tables inside the database, including the ones to be created in the future.
ALTER DATABASE ADD TABLE {<table1>, <table2>, ..., <tableN>} TO PUBLICATION
Enables replication for the specified set of tables.
ALTER DATABASE DROP ALL FROM PUBLICATION
Disables replication for all tables inside the database, including the ones to be created in the future.
ALTER DATABASE DROP TABLE {<table1>, <table2>, ..., <tableN>} FROM PUBLICATION
Disables replication for the specified set of tables.
23) Added optional replication control clauses to CREATE TABLE and ALTER TABLE statements.
(Dmitry Yemanov)
CREATE TABLE <name> ... [ {ENABLE | DISABLE} PUBLICATION ]
ALTER TABLE <name> ... [ {ENABLE | DISABLE} PUBLICATION ]
Defines whether replication is enabled for the specified table.
If not specified in the CREATE TABLE statement, the database-level default behaviour is applied.