This feature is in and subject to change. To share feedback and/or issues, contact Support.
CREATE LOGICALLY REPLICATED statement starts on a table(s) that runs between a source and destination cluster in an active-active setup. CREATE LOGICALLY REPLICATED creates the new table on the destination cluster automatically and conducts a fast, offline initial scan. It accepts unidirectional or bidirectional on as an option to create either one of the setups automatically.
Once the offline initial scan completes, the new table will come online and is ready to serve queries. In a setup, the second LDR stream will also initialize after the offline initial scan completes.
If the table to be replicated contains , you must use the statement instead. You can set up unidirectional or bidirectional LDR manually with
CREATE LOGICAL REPLICATION STREAM.CREATE LOGICALLY REPLICATED SQL statement, which includes information on its parameters and options. For a step-by-step guide to set up LDR, refer to the page.
Required privileges
CREATE LOGICALLY REPLICATED requires one of the following privileges:
- The .
- The .
Synopsis
<?xml version=“1.0” encoding=“UTF-8”?>Parameters
| Parameter | Description |
|---|---|
db_object_name | The name of the table on the source or destination cluster. Refer to Examples. |
logical_replication_resources_list | A list of the table names on the source or destination cluster to include in the LDR stream. Refer to the LDR with multiple tables example. |
source_connection_string | The connection string to the source cluster. Use an to store the source cluster’s connection URI. To start LDR, run CREATE LOGICALLY REPLICATED from the destination cluster. |
logical_replication_create_table_options | Options to modify the behavior of the LDR stream. For a list, refer to Options. Note: bidirectional on or unidirectionalis a required option. For use cases of unidirectional and bidirectional LDR, refer to the page. |
Options
| Option | Description |
|---|---|
bidirectional on / unidirectional | (Required) Specifies whether the LDR stream will be unidirectional or bidirectional. With bidirectional on specified, LDR will set up two LDR streams between the clusters. Refer to the examples for unidirectional and bidirectional. |
label | Tracks LDR metrics at the job level. Add a user-specified string with label. For more details, refer to . |
Examples
CREATE LOGICALLY REPLICATED will automatically create the specified source tables on the destination cluster. For unidirectional and bidirectional, run the statement to start LDR on the destination cluster that does not contain the tables.
Unidirectional
From the destination cluster of the LDR stream, run:- destination table name.
- source table name.
- for the source cluster. For instructions on creating the external connection for LDR, refer to .
unidirectionaloption.- Any other options.
Bidirectional
Both clusters will act as a source and destination in bidirectional LDR setups. To start the LDR jobs, you must run this statement from the destination cluster that does not contain the tables:- destination table name.
- source table name.
- for the source cluster. For instructions on creating the external connection for LDR, refer to .
bidirectional onoption defining the external connection for the destination cluster.- Any other options.

