Example - Sync from PostgreSQL to Tacnode
Preparation
Network setup refers to Data Synchronization Network Connection
Permissions
Only full synchronization jobs are included. The permissions outlined below are granted. Replace ${schema1}
and ${other_schema}
with the schemas that require synchronization. ${user}
refers to the individual managing the synchronization job.
Add a user with REPLICATION
permissions for incremental synchronization jobs. Existing users cannot be granted these permissions because cloud vendors do not provide SuperUser accounts.
- Log in using a high-privilege account
- Set up a CDC synchronization user:
- Grant permissions to cdc_user
Incremental Synchronization Job Settings
wal_level = logical
- If using self-built services, adjust the wal_level setting in the postgresql.conf file and restart the service.
Establish a Subscription (PUBLICATION)
- Log in using a high-privilege account
- Set up a subscription
or
Data Source Configuration
To set up the PostgreSQL data source, configure it using these connection properties:
- Host: Address of the PostgreSQL service
- Port: Typically 5432, this is the port for PostgreSQL services
- Username: The user with the necessary permissions
- Password: The password associated with the specified username
Default Node Mapping
The default mapping rules for mapping nodes are outlined below:
Meaning: In Tacnode, PostgreSQL tables are represented as d.s.t, where d indicates the database name, s is the schema, and t denotes the table name.
Default Type Mapping
A leading "_" signifies an array.
PostgreSQL | Tacnode |
---|---|
INT2 | INT2 |
_INT2 | _INT2 |
INT4 | INT4 |
_INT4 | _INT4 |
INT8 | INT8 |
_INT8 | _INT8 |
CHAR | CHAR |
_CHAR | _CHAR |
BPCHAR | BPCHAR |
_BPCHAR | _BPCHAR |
VARCHAR | VARCHAR |
_VARCHAR | _VARCHAR |
TEXT | TEXT |
_TEXT | _TEXT |
NUMERIC | NUMERIC |
_NUMERIC | _NUMERIC |
FLOAT4 | FLOAT4 |
_FLOAT4 | _FLOAT4 |
FLOAT8 | FLOAT8 |
_FLOAT8 | _FLOAT8 |
BOOL | BOOL |
_BOOL | _BOOL |
DATE | DATE |
_DATE | _DATE |
TIME | TIME |
_TIME | _TIME |
TIMETZ | TIMETZ |
_TIMETZ | _TIMETZ |
TIMESTAMP | TIMESTAMP |
_TIMESTAMP | _TIMESTAMP |
TIMESTAMPTZ | TIMESTAMPTZ |
_TIMESTAMPTZ | _TIMESTAMPTZ |
BYTEA | BYTEA |
_BYTEA | _BYTEA |
NAME | NAME |
NAME_ARRAY | NAME_ARRAY |
BIT | BIT |
_BIT | _BIT |
INTERVAL | INTERVAL |
_INTERVAL | _INTERVAL |
VARBIT | VARBIT |
_VARBIT | _VARBIT |
UUID | UUID |
_UUID | _UUID |
XML | XML |
_XML | _XML |
JSONB | JSONB |
_JSONB | _JSONB |
JSON | JSON |
_JSON | _JSON |