Control schema objects created for a publication v7

After you add a publication database definition and publications, the following control schema objects are created in addition to your original publication tables and views:

  • In the publication database, control schema objects are created to control and manage the Replication Server replication systems. How the control schema objects are organized under the actual, physical database schemas depends on the publication database server type, that is, whether it is Oracle, SQL Server, or Postgres.
  • If the publication isn't a snapshot-only publication, that is, synchronization replication is permitted and synchronization replication is implemented using the trigger-based method, then three triggers and one shadow table are created for each publication table as part of the control schema.
  • If the publication is using synchronization replication with the log-based method, then a single trigger is created for each publication table as part of the control schema.

Don't manually delete any of these database objects as the replication system control schema will become corrupted.

Removing publications and publication database definitions using the Replication Server console or CLI deletes the control schema objects.

Oracle control schema objects

The control schema objects created in the publication database user’s schema (that is, the control schema) are shown in the following output:

SQL> CONNECT pubuser/password
Connected.
SQL> SET PAGESIZE 9999
SQL> SELECT table_name FROM user_tables ORDER BY table_name;

TABLE_NAME
------------------------------
RREP_LOCK
RREP_MMR_PUB_GROUP
RREP_MMR_TXSET
RREP_PROPERTIES
RREP_PUBLICATION_SUBSCRIPTIONS
RREP_PUBLICATION_TABLES
RREP_TABLES
RREP_TXSET
RREP_TXSET_HEALTH
RREP_TXSET_LOG
RREP_TX_MONITOR
RREP_TX_MONITOR_TEMP
RRST_EDB_DEPT
RRST_EDB_EMP
SCH_PUB_BLOB_TRIGGERS
SCH_PUB_CALENDARS
SCH_PUB_CRON_TRIGGERS
SCH_PUB_FIRED_TRIGGERS
SCH_PUB_JOB_DETAILS
SCH_PUB_JOB_LISTENERS
SCH_PUB_LOCKS
SCH_PUB_PAUSED_TRIGGER_GRPS
SCH_PUB_SCHEDULER_STATE
SCH_PUB_SIMPLE_TRIGGERS
SCH_PUB_TRIGGERS
SCH_PUB_TRIGGER_LISTENERS
SCH_SUB_BLOB_TRIGGERS
SCH_SUB_CALENDARS
SCH_SUB_CRON_TRIGGERS
SCH_SUB_FIRED_TRIGGERS
SCH_SUB_JOB_DETAILS
SCH_SUB_JOB_LISTENERS
SCH_SUB_LOCKS
SCH_SUB_PAUSED_TRIGGER_GRPS
SCH_SUB_SCHEDULER_STATE
SCH_SUB_SIMPLE_TRIGGERS
SCH_SUB_TRIGGERS
SCH_SUB_TRIGGER_LISTENERS
XDB_CLEANUP_CONF
XDB_CONFLICTS
XDB_CONFLICTS_OPTIONS
XDB_EVENTS
XDB_EVENTS_STATUS
XDB_MMR_PUB_GROUP
XDB_PUBLICATIONS
XDB_PUBLICATION_FILTER
XDB_PUBLICATION_FILTER_RULE
XDB_PUBLICATION_SUBSCRIPTIONS
XDB_PUBTABLES_IGNOREDCOLS
XDB_PUB_DATABASE
XDB_PUB_REPLOG
XDB_PUB_TABLE_REPLOG
XDB_SUBSCRIPTIONS
XDB_SUBSCRIPTION_TABLES
XDB_SUB_DATABASE
XDB_SUB_SERVERS
XDB_TABLES

57 rows selected.

SQL> SELECT sequence_name FROM user_sequences ORDER BY sequence_name;

SEQUENCE_NAME
------------------------------
RREP_COMMON_SEQ
RREP_TXSET_SEQ
RREP_TX_SEQ

SQL> SELECT DISTINCT name FROM user_source WHERE type = 'PACKAGE';

NAME
------------------------------
RREP_PKG

SQL> SELECT trigger_name FROM user_triggers ORDER BY trigger_name;

TRIGGER_NAME
------------------------------
RRPD_EDB_DEPT
RRPD_EDB_EMP
RRPI_EDB_DEPT
RRPI_EDB_EMP
RRPU_EDB_DEPT
RRPU_EDB_EMP
SCH_PUB_BLOB_TRIGGERS_TRIGGER
SCH_PUB_CALENDARS_TRIGGER
SCH_PUB_CRON_TRIGGERS_TRIGGER
SCH_PUB_JOB_DETAILS_TRIGGER
SCH_PUB_JOB_LISTENERS_TRIGGER
SCH_PUB_SIMPLE_TRIGGERS_TRIG
SCH_PUB_TRIGGERS_TRIG
SCH_PUB_TRIGGER_LISTENERS_TRIG
SCH_SUB_BLOB_TRIGGERS_TRIGGER
SCH_SUB_CALENDARS_TRIGGER
SCH_SUB_CRON_TRIGGERS_TRIGGER
SCH_SUB_JOB_DETAILS_TRIGGER
SCH_SUB_JOB_LISTENERS_TRIGGER
SCH_SUB_SIMPLE_TRIGGERS_TRIG
SCH_SUB_TRIGGERS_TRIG
SCH_SUB_TRIGGER_LISTENERS_TRIG
XDB_CLEANUP_CONF_TRIGGER
XDB_CONFLICTS_OPTIONS_TRIGGER
XDB_CONFLICTS_TRIGGER
XDB_MMR_PUB_GROUP_TRIGGER
XDB_PUBLICATIONS_TRIGGER
XDB_PUBLICATION_FILTER_TRIGGER
XDB_PUBLICATION_SUBSCRIPT_TRIG
XDB_PUBLIC_FILTER_RULE_TRIGGER
XDB_PUBTABLES_IGNOREDCOLS_TRIG
XDB_PUB_DATABASE_TRIGGER
XDB_PUB_REPLOG_TRIGGER
XDB_PUB_TABLE_REPLOG_TRIGGER
XDB_SUBSCRIPTIONS_TRIGGER
XDB_SUBSCRIPTION_TABLES_TRIG
XDB_SUB_DATABASE_TRIGGER
XDB_SUB_SERVERS_TRIGGER
XDB_TABLES_TRIGGER

39 rows selected.

SQL> SELECT type_name, typecode FROM user_types;

TYPE_NAME                      TYPECODE
------------------------------ ------------------------------
RREP_SYNCID_ARRAY              COLLECTION

Note the following:

  • The tables named according to the convention RRST_schema_table from the SELECT statement on user_tables are found only for synchronization publications. In this example, these tables are RRST_EDB_DEPT and RRST_EDB_EMP.
  • The triggers named according to the convention RRPD_schema_tableRRPI_schema_table, and RRPU_schema_table from the SELECT statement on user_triggersare found only for synchronization publications. In this example, these triggers are RRPU_EDB_DEPT, RRPI_EDB_DEPT, RRPD_EDB_DEPT, RRPI_EDB_EMP, RRPU_EDB_EMP, and RRPD_EDB_EMP.

The following example shows what the same set of queries look like for a snapshot-only publication:

SQL> CONNECT pubuser/password
Connected.
SQL> SET PAGESIZE 9999
SQL> SELECT table_name FROM user_tables ORDER BY table_name;

TABLE_NAME
------------------------------
RREP_LOCK
RREP_MMR_PUB_GROUP
RREP_MMR_TXSET
RREP_PROPERTIES
RREP_PUBLICATION_SUBSCRIPTIONS
RREP_PUBLICATION_TABLES
RREP_TABLES
RREP_TXSET
RREP_TXSET_HEALTH
RREP_TXSET_LOG
RREP_TX_MONITOR
RREP_TX_MONITOR_TEMP
SCH_PUB_BLOB_TRIGGERS
SCH_PUB_CALENDARS
SCH_PUB_CRON_TRIGGERS
SCH_PUB_FIRED_TRIGGERS
SCH_PUB_JOB_DETAILS
SCH_PUB_JOB_LISTENERS
SCH_PUB_LOCKS
SCH_PUB_PAUSED_TRIGGER_GRPS
SCH_PUB_SCHEDULER_STATE
SCH_PUB_SIMPLE_TRIGGERS
SCH_PUB_TRIGGERS
SCH_PUB_TRIGGER_LISTENERS
SCH_SUB_BLOB_TRIGGERS
SCH_SUB_CALENDARS
SCH_SUB_CRON_TRIGGERS
SCH_SUB_FIRED_TRIGGERS
SCH_SUB_JOB_DETAILS
SCH_SUB_JOB_LISTENERS
SCH_SUB_LOCKS
SCH_SUB_PAUSED_TRIGGER_GRPS
SCH_SUB_SCHEDULER_STATE
SCH_SUB_SIMPLE_TRIGGERS
SCH_SUB_TRIGGERS
SCH_SUB_TRIGGER_LISTENERS
XDB_CLEANUP_CONF
XDB_CONFLICTS
XDB_CONFLICTS_OPTIONS
XDB_EVENTS
XDB_EVENTS_STATUS
XDB_MMR_PUB_GROUP
XDB_PUBLICATIONS
XDB_PUBLICATION_FILTER
XDB_PUBLICATION_FILTER_RULE
XDB_PUBLICATION_SUBSCRIPTIONS
XDB_PUBTABLES_IGNOREDCOLS
XDB_PUB_DATABASE
XDB_PUB_REPLOG
XDB_PUB_TABLE_REPLOG
XDB_SUBSCRIPTIONS
XDB_SUBSCRIPTION_TABLES
XDB_SUB_DATABASE
XDB_SUB_SERVERS
XDB_TABLES

55 rows selected.

SQL> SELECT sequence_name FROM user_sequences ORDER BY sequence_name;

SEQUENCE_NAME
------------------------------
RREP_COMMON_SEQ
RREP_TXSET_SEQ
RREP_TX_SEQ

SQL> SELECT DISTINCT name FROM user_source WHERE type = 'PACKAGE';

NAME
------------------------------
RREP_PKG

SQL> SELECT trigger_name FROM user_triggers ORDER BY trigger_name;

TRIGGER_NAME
------------------------------
SCH_PUB_BLOB_TRIGGERS_TRIGGER
SCH_PUB_CALENDARS_TRIGGER
SCH_PUB_CRON_TRIGGERS_TRIGGER
SCH_PUB_JOB_DETAILS_TRIGGER
SCH_PUB_JOB_LISTENERS_TRIGGER
SCH_PUB_SIMPLE_TRIGGERS_TRIG
SCH_PUB_TRIGGERS_TRIG
SCH_PUB_TRIGGER_LISTENERS_TRIG
SCH_SUB_BLOB_TRIGGERS_TRIGGER
SCH_SUB_CALENDARS_TRIGGER
SCH_SUB_CRON_TRIGGERS_TRIGGER
SCH_SUB_JOB_DETAILS_TRIGGER
SCH_SUB_JOB_LISTENERS_TRIGGER
SCH_SUB_SIMPLE_TRIGGERS_TRIG
SCH_SUB_TRIGGERS_TRIG
SCH_SUB_TRIGGER_LISTENERS_TRIG
XDB_CLEANUP_CONF_TRIGGER
XDB_CONFLICTS_OPTIONS_TRIGGER
XDB_CONFLICTS_TRIGGER
XDB_MMR_PUB_GROUP_TRIGGER
XDB_PUBLICATIONS_TRIGGER
XDB_PUBLICATION_FILTER_TRIGGER
XDB_PUBLICATION_SUBSCRIPT_TRIG
XDB_PUBLIC_FILTER_RULE_TRIGGER
XDB_PUBTABLES_IGNOREDCOLS_TRIG
XDB_PUB_DATABASE_TRIGGER
XDB_PUB_REPLOG_TRIGGER
XDB_PUB_TABLE_REPLOG_TRIGGER
XDB_SUBSCRIPTIONS_TRIGGER
XDB_SUBSCRIPTION_TABLES_TRIG
XDB_SUB_DATABASE_TRIGGER
XDB_SUB_SERVERS_TRIGGER
XDB_TABLES_TRIGGER

33 rows selected.

SQL> SELECT type_name, typecode FROM user_types;

TYPE_NAME                      TYPECODE
------------------------------ ------------------------------
RREP_SYNCID_ARRAY              COLLECTION
Note

The RREP_SYNCID_ARRAY collection type is found only in an Oracle publication database.

SQL Server control schema objects

Most of the control schema objects are created in schemas _edb_replicator_pub, _edb_replicator_sub, and _edb_scheduler. Additional control schema objects are created in the schema you chose in Step 5 of SQL Server publication database. The following examples assume the schema you chose is pubuser. The publication tables are dept and emp located in the edb schema.

The following query lists the control schema objects located in these schemas:

1> USE edb;
2> GO
Changed database context to 'edb'.
1> SELECT s.name + '.' + o.name "Object Name", o.type_desc "Object Type"
2>   FROM sys.objects o,
3>        sys.schemas s
4>   WHERE s.name IN ('_edb_replicator_pub', '_edb_replicator_sub',
5>                    '_edb_scheduler', 'pubuser')
6>     AND o.type IN ('U','P','FN')
7>     AND o.schema_id = s.schema_id
8>   ORDER BY 1, 2;
9> GO
Object Name                                        Object Type
-------------------------------------------------- ---------------------
_edb_replicator_pub.nextval                        SQL_STORED_PROCEDURE
_edb_replicator_pub.rrep_common_seq                USER_TABLE
_edb_replicator_pub.rrep_lock                      USER_TABLE
_edb_replicator_pub.rrep_MMR_pub_group             USER_TABLE
_edb_replicator_pub.rrep_MMR_txset                 USER_TABLE
_edb_replicator_pub.rrep_properties                USER_TABLE
_edb_replicator_pub.rrep_publication_subscriptions USER_TABLE
_edb_replicator_pub.rrep_publication_tables        USER_TABLE
_edb_replicator_pub.rrep_tables                    USER_TABLE
_edb_replicator_pub.rrep_tx_monitor                USER_TABLE
_edb_replicator_pub.rrep_tx_seq                    USER_TABLE
_edb_replicator_pub.rrep_txset                     USER_TABLE
_edb_replicator_pub.rrep_txset_health              USER_TABLE
_edb_replicator_pub.rrep_txset_log                 USER_TABLE
_edb_replicator_pub.rrep_txset_seq                 USER_TABLE
_edb_replicator_pub.sp_createsequence              SQL_STORED_PROCEDURE
_edb_replicator_pub.sp_dropsequence                SQL_STORED_PROCEDURE
_edb_replicator_pub.xdb_cleanup_conf               USER_TABLE
_edb_replicator_pub.xdb_conflicts                  USER_TABLE
_edb_replicator_pub.xdb_conflicts_options          USER_TABLE
_edb_replicator_pub.xdb_events                     USER_TABLE
_edb_replicator_pub.xdb_events_status              USER_TABLE
_edb_replicator_pub.xdb_MMR_pub_group              USER_TABLE
_edb_replicator_pub.xdb_pub_database               USER_TABLE
_edb_replicator_pub.xdb_pub_replog                 USER_TABLE
_edb_replicator_pub.xdb_pub_table_replog           USER_TABLE
_edb_replicator_pub.xdb_publication_filter         USER_TABLE
_edb_replicator_pub.xdb_publication_filter_rule    USER_TABLE
_edb_replicator_pub.xdb_publication_subscriptions  USER_TABLE
_edb_replicator_pub.xdb_publications               USER_TABLE
_edb_replicator_pub.xdb_pubtables_ignoredcols      USER_TABLE
_edb_replicator_pub.xdb_sub_servers                USER_TABLE
_edb_replicator_sub.rrep_common_seq                USER_TABLE
_edb_replicator_sub.xdb_sub_database               USER_TABLE
_edb_replicator_sub.xdb_subscription_tables        USER_TABLE
_edb_replicator_sub.xdb_subscriptions              USER_TABLE
_edb_replicator_sub.xdb_tables                     USER_TABLE
_edb_scheduler.sch_pub_BLOB_TRIGGERS               USER_TABLE
_edb_scheduler.sch_pub_CALENDARS                   USER_TABLE
_edb_scheduler.sch_pub_CRON_TRIGGERS               USER_TABLE
_edb_scheduler.sch_pub_FIRED_TRIGGERS              USER_TABLE
_edb_scheduler.sch_pub_JOB_DETAILS                 USER_TABLE
_edb_scheduler.sch_pub_JOB_LISTENERS               USER_TABLE
_edb_scheduler.sch_pub_LOCKS                       USER_TABLE
_edb_scheduler.sch_pub_PAUSED_TRIGGER_GRPS         USER_TABLE
_edb_scheduler.sch_pub_SCHEDULER_STATE             USER_TABLE
_edb_scheduler.sch_pub_SIMPLE_TRIGGERS             USER_TABLE
_edb_scheduler.sch_pub_TRIGGER_LISTENERS           USER_TABLE
_edb_scheduler.sch_pub_TRIGGERS                    USER_TABLE
_edb_scheduler.sch_sub_BLOB_TRIGGERS               USER_TABLE
_edb_scheduler.sch_sub_CALENDARS                   USER_TABLE
_edb_scheduler.sch_sub_CRON_TRIGGERS               USER_TABLE
_edb_scheduler.sch_sub_FIRED_TRIGGERS              USER_TABLE
_edb_scheduler.sch_sub_JOB_DETAILS                 USER_TABLE
_edb_scheduler.sch_sub_JOB_LISTENERS               USER_TABLE
_edb_scheduler.sch_sub_LOCKS                       USER_TABLE
_edb_scheduler.sch_sub_PAUSED_TRIGGER_GRPS         USER_TABLE
_edb_scheduler.sch_sub_SCHEDULER_STATE             USER_TABLE
_edb_scheduler.sch_sub_SIMPLE_TRIGGERS             USER_TABLE
_edb_scheduler.sch_sub_TRIGGER_LISTENERS           USER_TABLE
_edb_scheduler.sch_sub_TRIGGERS                    USER_TABLE
pubuser.CleanupShadowTables                        SQL_STORED_PROCEDURE
pubuser.ConfigureCleanUpJob                        SQL_STORED_PROCEDURE
pubuser.ConfigureCreateTxSetJob                    SQL_STORED_PROCEDURE
pubuser.CreateMultiTxSet                           SQL_STORED_PROCEDURE
pubuser.CreateTableLogTrigger                      SQL_STORED_PROCEDURE
pubuser.CreateTxSet                                SQL_STORED_PROCEDURE
pubuser.CreateTxSet_old                            SQL_STORED_PROCEDURE
pubuser.CreateUniTxSet                             SQL_STORED_PROCEDURE
pubuser.GetNewTxsCount                             SQL_STORED_PROCEDURE
pubuser.getPackageVersionNumber                    SQL_SCALAR_FUNCTION
pubuser.JobCleanup                                 SQL_STORED_PROCEDURE
pubuser.JobCreateTxSet                             SQL_STORED_PROCEDURE
pubuser.LoadPubTableList                           SQL_STORED_PROCEDURE
pubuser.RemoveCleanupJob                           SQL_STORED_PROCEDURE
pubuser.RemoveCreateTxSetJob                       SQL_STORED_PROCEDURE
pubuser.rrst_edb_dept                              USER_TABLE
pubuser.rrst_edb_emp                               USER_TABLE

(78 rows affected)

Note (For SQL Server 2012, 2014): The following database objects from the preceding list are no longer created as part of the control schema when the publication database is SQL Server 2012 or 2014:

Object Name                                        Object Type
-------------------------------------------------- ---------------------
_edb_replicator_pub.nextval                        SQL_STORED_PROCEDURE
_edb_replicator_pub.rrep_common_seq                USER_TABLE
_edb_replicator_pub.rrep_tx_seq                    USER_TABLE
_edb_replicator_pub.rrep_txset_seq                 USER_TABLE
_edb_replicator_pub.sp_createsequence              SQL_STORED_PROCEDURE
_edb_replicator_pub.sp_dropsequence                SQL_STORED_PROCEDURE
_edb_replicator_sub.rrep_common_seq                USER_TABLE

SQL Server versions 2014 and 2012 support creation of sequence objects that can now perform the functionality previously provided by the preceding list of objects. The following are the sequence objects that are now used when the publication database is SQL Server 2012 or 2014:

1> USE edb;
2> GO
Changed database context to 'edb'.
1> SELECT s.name + '.' + o.name "Object Name", o.type_desc "Object Type"
2>   FROM sys.objects o,
3>        sys.schemas s
4>   WHERE s.name IN ('_edb_replicator_pub', '_edb_replicator_sub',
5>                    '_edb_scheduler', 'pubuser')
6>     AND o.type IN ('SO')
7>     AND o.schema_id = s.schema_id
8>   ORDER BY 1, 2;
9> GO
Object Name                                        Object Type
-------------------------------------------------- ---------------------
_edb_replicator_pub.rrep_common_seq                SEQUENCE_OBJECT
_edb_replicator_pub.rrep_tx_seq                    SEQUENCE_OBJECT
_edb_replicator_pub.rrep_txset_seq                 SEQUENCE_OBJECT

(3 rows affected)

The following is a continuation of the list of control schema objects for all SQL Server versions:

1> USE edb;
2> GO
Changed database context to 'edb'.
1> SELECT s.name + '.' + o.name "Trigger Name", o.type_desc "Object Type"
2>   FROM sys.objects o,
3>        sys.schemas s
4>   WHERE s.name IN ('_edb_replicator_pub', '_edb_replicator_sub',
5>                      '_edb_scheduler', 'pubuser')
6>     AND o.type = 'TR'
7>     AND o.schema_id = s.schema_id
8>   ORDER BY 1;
9> GO
Trigger Name                                               Object Type
---------------------------------------------------------- --------------
_edb_replicator_pub.xdb_cleanup_conf_trigger               SQL_TRIGGER
_edb_replicator_pub.xdb_conflicts_options_trigger          SQL_TRIGGER
_edb_replicator_pub.xdb_conflicts_trigger                  SQL_TRIGGER
_edb_replicator_pub.xdb_MMR_pub_group_trigger              SQL_TRIGGER
_edb_replicator_pub.xdb_pub_database_trigger               SQL_TRIGGER
_edb_replicator_pub.xdb_pub_replog_trigger                 SQL_TRIGGER
_edb_replicator_pub.xdb_pub_table_replog_trigger           SQL_TRIGGER
_edb_replicator_pub.xdb_public_filter_rule_trigger         SQL_TRIGGER
_edb_replicator_pub.xdb_publication_filter_trigger         SQL_TRIGGER
_edb_replicator_pub.xdb_publication_subscription_triggers  SQL_TRIGGER
_edb_replicator_pub.xdb_publications_trigger               SQL_TRIGGER
_edb_replicator_pub.xdb_pubtables_ignoredcols_trig         SQL_TRIGGER
_edb_replicator_pub.xdb_sub_servers_trigger                SQL_TRIGGER
_edb_replicator_sub.xdb_sub_database_trigger               SQL_TRIGGER
_edb_replicator_sub.xdb_subscription_tables_trig           SQL_TRIGGER
_edb_replicator_sub.xdb_subscriptions_trigger              SQL_TRIGGER
_edb_replicator_sub.xdb_tables_trigger                     SQL_TRIGGER
_edb_scheduler.sch_pub_blob_triggers_trigger               SQL_TRIGGER
_edb_scheduler.sch_pub_calendars_trigger                   SQL_TRIGGER
_edb_scheduler.sch_pub_cron_triggers_trigger               SQL_TRIGGER
_edb_scheduler.sch_pub_job_details_trigger                 SQL_TRIGGER
_edb_scheduler.sch_pub_job_listeners_trigger               SQL_TRIGGER
_edb_scheduler.sch_pub_simple_triggers_trigger             SQL_TRIGGER
_edb_scheduler.sch_pub_trigger_listeners_trigger           SQL_TRIGGER
_edb_scheduler.sch_pub_triggers_trigger                    SQL_TRIGGER
_edb_scheduler.sch_sub_blob_triggers_trigger               SQL_TRIGGER
_edb_scheduler.sch_sub_calendars_trigger                   SQL_TRIGGER
_edb_scheduler.sch_sub_cron_triggers_trigger               SQL_TRIGGER
_edb_scheduler.sch_sub_job_details_trigger                 SQL_TRIGGER
_edb_scheduler.sch_sub_job_listeners_trigger               SQL_TRIGGER
_edb_scheduler.sch_sub_simple_triggers_trigger             SQL_TRIGGER
_edb_scheduler.sch_sub_trigger_listeners_trigger           SQL_TRIGGER
_edb_scheduler.sch_sub_triggers_trigger                    SQL_TRIGGER

(33 rows affected)

For non-snapshot-only publication tables, triggers are created that reside in the schema containing the publication tables as shown by the following:

1> USE edb;
2> GO
Changed database context to 'edb'.
1> SELECT s.name + '.' + o.name "Trigger Name"
2>   FROM sys.objects o,
3>        sys.schemas s
4>   WHERE s.name = 'edb'
5>     AND o.type = 'TR'
6>     AND o.name LIKE 'rr%'
7>     AND o.schema_id = s.schema_id
8>   ORDER BY 1;
9> GO
Trigger Name
--------------------------------------
edb.rrpd_edb_dept
edb.rrpd_edb_emp
edb.rrpi_edb_dept
edb.rrpi_edb_emp
edb.rrpu_edb_dept
edb.rrpu_edb_emp

(6 rows affected)

Finally, some jobs are created in the msdb database after the subscription is created as shown by the following:

1> USE msdb;
2> GO
Changed database context to 'msdb'.
1> SELECT j.name "Job Name"
2>   FROM msdb.dbo.sysjobs j,
3>        primary.dbo.syslogins l
4>   WHERE l.name = 'pubuser'
5>     AND j.name LIKE 'rrep%'
6>     AND j.owner_sid = l.sid
7>   ORDER BY 1;
8> GO
Job Name
--------------------------------------
rrep_cleanup_job_edb
rrep_txset_job_edb

(2 rows affected)

Postgres control schema objects

The control schema objects are created in three schemas named _edb_replicator_pub, _edb_replicator_sub, and _edb_scheduler.

The control schema objects contained in _edb_replicator_pub are shown by the following:

edb=# SET search_path TO _edb_replicator_pub;
SET
edb=# \dt
                           List of relations
       Schema        |              Name              | Type  |  Owner
---------------------+--------------------------------+-------+---------
 _edb_replicator_pub | rrep_lock                      | table | pubuser
 _edb_replicator_pub | rrep_MMR_pub_group             | table | pubuser
 _edb_replicator_pub | rrep_MMR_txset                 | table | pubuser
 _edb_replicator_pub | rrep_properties                | table | pubuser
 _edb_replicator_pub | rrep_publication_subscriptions | table | pubuser
 _edb_replicator_pub | rrep_publication_tables        | table | pubuser
 _edb_replicator_pub | rrep_tables                    | table | pubuser
 _edb_replicator_pub | rrep_tx_monitor                | table | pubuser
 _edb_replicator_pub | rrep_txset                     | table | pubuser
 _edb_replicator_pub | rrep_txset_health              | table | pubuser
 _edb_replicator_pub | rrep_txset_log                 | table | pubuser
 _edb_replicator_pub | rrep_wal_events_queue          | table | pubuser
 _edb_replicator_pub | rrst_edb_dept                  | table | pubuser
 _edb_replicator_pub | rrst_edb_emp                   | table | pubuser
 _edb_replicator_pub | xdb_cleanup_conf               | table | pubuser
 _edb_replicator_pub | xdb_conflicts                  | table | pubuser
 _edb_replicator_pub | xdb_conflicts_options          | table | pubuser
 _edb_replicator_pub | xdb_events                     | table | pubuser
 _edb_replicator_pub | xdb_events_status              | table | pubuser
 _edb_replicator_pub | xdb_MMR_pub_group              | table | pubuser
 _edb_replicator_pub | xdb_pub_database               | table | pubuser
 _edb_replicator_pub | xdb_pub_replog                 | table | pubuser
 _edb_replicator_pub | xdb_pub_table_replog           | table | pubuser
 _edb_replicator_pub | xdb_publication_filter         | table | pubuser
 _edb_replicator_pub | xdb_publication_filter_rule    | table | pubuser
 _edb_replicator_pub | xdb_publication_subscriptions  | table | pubuser
 _edb_replicator_pub | xdb_publications               | table | pubuser
 _edb_replicator_pub | xdb_pubtables_ignoredcols      | table | pubuser
 _edb_replicator_pub | xdb_sub_servers                | table | pubuser
(29 rows)

edb=# \ds
                     List of relations
       Schema        |      Name       |   Type   |  Owner
---------------------+-----------------+----------+---------
 _edb_replicator_pub | rrep_common_seq | sequence | pubuser
 _edb_replicator_pub | rrep_tx_seq     | sequence | pubuser
 _edb_replicator_pub | rrep_txset_seq  | sequence | pubuser
(3 rows)

edb=# SELECT nspname, pkgname FROM edb_package pk, pg_namespace ns
edb-#   WHERE nspname IN ('_edb_replicator_pub', '_edb_replicator_sub')
edb-#     AND pk.pkgnamespace = ns.oid;
       nspname       | pkgname
---------------------+----------
 _edb_replicator_pub | rrep_pkg
(1 row)

edb=# SELECT nspname, funname, typname FROM pg_function fn, pg_namespace ns,
edb-#     pg_type ty
edb-#   WHERE nspname = '_edb_replicator_pub'
edb-#     AND ns.oid = fn.funnamespace
edb-#     AND ty.oid = fn.funrettype
edb-#   ORDER BY typname, funname;
       nspname       |                   funname                    | typname
---------------------+----------------------------------------------+---------
 _edb_replicator_pub | capturetruncateevent                         | trigger
 _edb_replicator_pub | erep_filter_rule_delete_trigger_tgfunc       | trigger
 _edb_replicator_pub | erep_pub_database_trigger_tgfunc             | trigger
 _edb_replicator_pub | erep_publication_delete_trigger_tgfunc       | trigger
 _edb_replicator_pub | xdb_cleanup_conf_trigger_tgfunc              | trigger
 _edb_replicator_pub | xdb_conflicts_options_trigger_tgfunc         | trigger
 _edb_replicator_pub | xdb_conflicts_trigger_tgfunc                 | trigger
 _edb_replicator_pub | xdb_MMR_pub_group_trigger_tgfunc             | trigger
 _edb_replicator_pub | xdb_pub_database_trigger_tgfunc              | trigger
 _edb_replicator_pub | xdb_pub_replog_trigger_tgfunc                | trigger
 _edb_replicator_pub | xdb_pub_table_replog_trigger_tgfunc          | trigger
 _edb_replicator_pub | xdb_publication_filter_rule_trigger_tgfunc   | trigger
 _edb_replicator_pub | xdb_publication_filter_trigger_tgfunc        | trigger
 _edb_replicator_pub | xdb_publication_subscriptions_trigger_tgfunc | trigger
 _edb_replicator_pub | xdb_publications_trigger_tgfunc              | trigger
 _edb_replicator_pub | xdb_pubtables_ignoredcols_trigger_tgfunc     | trigger
 _edb_replicator_pub | xdb_sub_servers_trigger_tgfunc               | trigger
 _edb_replicator_pub | getpackageversionnumber                      | varchar
(18 rows)

The control schema objects contained in \_edb_replicator_sub are shown by the following:

edb=# SET search_path TO _edb_replicator_sub;
SET
edb=# \dt
                        List of relations
       Schema        |          Name           | Type  |  Owner
---------------------+-------------------------+-------+---------
 _edb_replicator_sub | xdb_sub_database        | table | pubuser
 _edb_replicator_sub | xdb_subscription_tables | table | pubuser
 _edb_replicator_sub | xdb_subscriptions       | table | pubuser
 _edb_replicator_sub | xdb_tables              | table | pubuser
(4 rows)

edb=# \ds
                     List of relations
       Schema        |      Name       |   Type   |  Owner
---------------------+-----------------+----------+---------
 _edb_replicator_sub | rrep_common_seq | sequence | pubuser
(1 row)

edb=# SELECT nspname, funname, typname FROM pg_function fn, pg_namespace ns,
edb-#     pg_type ty
edb-#   WHERE nspname = '_edb_replicator_sub'
edb-#     AND ns.oid = fn.funnamespace
edb-#     AND ty.oid = fn.funrettype
edb-#   ORDER BY typname, funname;
       nspname       |                funname                 | typname
---------------------+----------------------------------------+---------
 _edb_replicator_sub | xdb_sub_database_trigger_tgfunc        | trigger
 _edb_replicator_sub | xdb_subscription_tables_trigger_tgfunc | trigger
 _edb_replicator_sub | xdb_subscriptions_trigger_tgfunc       | trigger
 _edb_replicator_sub | xdb_tables_trigger_tgfunc              | trigger
(4 rows)

The control schema objects contained in _edb_scheduler are shown by the following:

edb=# SET search_path TO _edb_scheduler;
SET
edb=# \dt
                       List of relations
     Schema     |            Name             | Type  |  Owner
----------------+-----------------------------+-------+---------
 _edb_scheduler | sch_pub_blob_triggers       | table | pubuser
 _edb_scheduler | sch_pub_calendars           | table | pubuser
 _edb_scheduler | sch_pub_cron_triggers       | table | pubuser
 _edb_scheduler | sch_pub_fired_triggers      | table | pubuser
 _edb_scheduler | sch_pub_job_details         | table | pubuser
 _edb_scheduler | sch_pub_job_listeners       | table | pubuser
 _edb_scheduler | sch_pub_locks               | table | pubuser
 _edb_scheduler | sch_pub_paused_trigger_grps | table | pubuser
 _edb_scheduler | sch_pub_scheduler_state     | table | pubuser
 _edb_scheduler | sch_pub_simple_triggers     | table | pubuser
 _edb_scheduler | sch_pub_trigger_listeners   | table | pubuser
 _edb_scheduler | sch_pub_triggers            | table | pubuser
 _edb_scheduler | sch_sub_blob_triggers       | table | pubuser
 _edb_scheduler | sch_sub_calendars           | table | pubuser
 _edb_scheduler | sch_sub_cron_triggers       | table | pubuser
 _edb_scheduler | sch_sub_fired_triggers      | table | pubuser
 _edb_scheduler | sch_sub_job_details         | table | pubuser
 _edb_scheduler | sch_sub_job_listeners       | table | pubuser
 _edb_scheduler | sch_sub_locks               | table | pubuser
 _edb_scheduler | sch_sub_paused_trigger_grps | table | pubuser
 _edb_scheduler | sch_sub_scheduler_state     | table | pubuser
 _edb_scheduler | sch_sub_simple_triggers     | table | pubuser
 _edb_scheduler | sch_sub_trigger_listeners   | table | pubuser
 _edb_scheduler | sch_sub_triggers            | table | pubuser
(24 rows)

edb=# SELECT nspname, funname, typname FROM pg_function fn, pg_namespace ns,
edb-#     pg_type ty
edb-#   WHERE nspname = '_edb_scheduler'
edb-#     AND ns.oid = fn.funnamespace
edb-#     AND ty.oid = fn.funrettype
edb-#   ORDER BY typname, funname;
    nspname     |                 funname                  | typname
----------------+------------------------------------------+---------
 _edb_scheduler | sch_pub_blob_triggers_trigger_tgfunc     | trigger
 _edb_scheduler | sch_pub_calendars_trigger_tgfunc         | trigger
 _edb_scheduler | sch_pub_cron_triggers_trigger_tgfunc     | trigger
 _edb_scheduler | sch_pub_job_details_trigger_tgfunc       | trigger
 _edb_scheduler | sch_pub_job_listeners_trigger_tgfunc     | trigger
 _edb_scheduler | sch_pub_simple_triggers_trigger_tgfunc   | trigger
 _edb_scheduler | sch_pub_trigger_listeners_trigger_tgfunc | trigger
 _edb_scheduler | sch_pub_triggers_trigger_tgfunc          | trigger
 _edb_scheduler | sch_sub_blob_triggers_trigger_tgfunc     | trigger
 _edb_scheduler | sch_sub_calendars_trigger_tgfunc         | trigger
 _edb_scheduler | sch_sub_cron_triggers_trigger_tgfunc     | trigger
 _edb_scheduler | sch_sub_job_details_trigger_tgfunc       | trigger
 _edb_scheduler | sch_sub_job_listeners_trigger_tgfunc     | trigger
 _edb_scheduler | sch_sub_simple_triggers_trigger_tgfunc   | trigger
 _edb_scheduler | sch_sub_trigger_listeners_trigger_tgfunc | trigger
 _edb_scheduler | sch_sub_triggers_trigger_tgfunc          | trigger
(16 rows)

In addition, triggers and trigger functions are created in the schema containing the publication tables if the trigger-based method of synchronization replication is used.

edb=# SET search_path TO edb;
SET
edb=# \df rr*
                                List of functions
 Schema |         Name         | Result data type | Argument data types |  Type
--------+----------------------+------------------+---------------------+---------
 edb    | rrpd_edb_dept_tgfunc | trigger          |                     | trigger
 edb    | rrpd_edb_emp_tgfunc  | trigger          |                     | trigger
 edb    | rrpi_edb_dept_tgfunc | trigger          |                     | trigger
 edb    | rrpi_edb_emp_tgfunc  | trigger          |                     | trigger
 edb    | rrpu_edb_dept_tgfunc | trigger          |                     | trigger
 edb    | rrpu_edb_emp_tgfunc  | trigger          |                     | trigger
(6 rows)

If the log-based method of synchronization replication is used, the following triggers are created on the publication tables:

edb=# SELECT t.tgname AS "Trigger Name", c.relname AS "Table Name",
edb-#        f.funname AS "Trigger Function"
edb-#   FROM pg_trigger t, pg_function f, pg_class c
edb-#   WHERE tgname LIKE 'rrpt%'
edb-#     AND t.tgfoid = f.oid
edb-#     AND t.tgrelid = c.oid
edb-#   ORDER BY t.tgname;
 Trigger Name  | Table Name |   Trigger Function
---------------+------------+----------------------
 rrpt_edb_dept | dept       | capturetruncateevent
 rrpt_edb_emp  | emp        | capturetruncateevent
(2 rows)

These triggers are used to support synchronization replication of the TRUNCATE command when using the log-based method.