Type | Supported Version |
Self-Built PostgreSQL | 9.6 / 10.x / 11.x / 12.x / 13.x / 14.x / 15.x / 16.x |
Tencent Cloud PostgreSQL | 11.x / 12.x / 13.x / 14.x / 15.x / 16.x / 17.x / 18.x |
JDBC Driver | postgresql-42.2.26 |
Capability | Offline read | Real-time full database read | Sharded database and table read |
Supported | ✓ | ✓ | ✓ |
Limit | Description |
Logical Replication Version Requirement | Native logical replication is supported only in PostgreSQL 10+. |
wal_level | Must be set to logical |
Replication Slot | Create a Replication Slot. |
Table without primary key | Set REPLICA IDENTITY FULL. |
Publication | Create a publication to specify the tables to be synchronized. |
Limit | Description |
View | Supports view reading |
Split Key | Only integer fields are supported |
Table Name with Special Characters | Table names / field names cannot start with a digit or contain uppercase letters, lowercase letters, or hyphens. |
Field Type | Offline read | Real-time read |
SMALLINT / SMALLSERIAL / INTEGER / SERIAL / BIGINT / BIGSERIAL | ✅ | ✅ |
REAL / DOUBLE PRECISION / NUMERIC / DECIMAL / MONEY | ✅ | ✅ |
BOOLEAN | ✅ | ✅ |
CHAR / VARCHAR / TEXT / UUID | ✅ | ✅ |
JSON / JSONB / ARRAY | ✅ | ✅ |
DATE / TIME / TIMETZ / TIMESTAMP / TIMESTAMPTZ | ✅ | ✅ |
INTERVAL | ❌ | ✅ |
BYTEA / BIT / BIT VARYING | ✅ | ✅ |
CIDR / INET / MACADDR | ❌ | ❌ |
POINT / LINE / LSEG / BOX / PATH / POLYGON / CIRCLE | ❌ | ❌ |
Operation | Whether Supported |
INSERT / DELETE / UPDATE | ✅ |
Operation | Whether Supported |
Add table / Add column / Delete column / Modify column type | ✅ |
Delete table / Clear table / Rename table (RENAME TABLE) | ❌ |
PostgreSQL logical replication has limited support for DDL changes. After Schema changes, you may need to reconfigure the synchronization task and publication.
CREATE USER wedata_user WITH PASSWORD 'your_password';GRANT CONNECT ON DATABASE your_database TO wedata_user;GRANT USAGE ON SCHEMA public TO wedata_user;GRANT SELECT ON ALL TABLES IN SCHEMA public TO wedata_user;
CREATE USER wedata_cdc_user WITH REPLICATION PASSWORD 'your_password';GRANT CONNECT ON DATABASE your_database TO wedata_cdc_user;GRANT USAGE ON SCHEMA public TO wedata_cdc_user;GRANT SELECT ON ALL TABLES IN SCHEMA public TO wedata_cdc_user;
SHOW wal_level;
wal_level to logical in Parameter Settings in the console. For self-managed PostgreSQL, modify postgresql.conf:wal_level = logicalmax_replication_slots = 10max_wal_senders = 10
# TYPE DATABASE USER ADDRESS METHODhost replication wedata_cdc_user 10.0.0.0/8 md5
CREATE PUBLICATION wedata_pub FOR TABLE table1, table2;-- Or: CREATE PUBLICATION wedata_pub FOR ALL TABLES;
ALTER TABLE your_table REPLICA IDENTITY FULL;
Parameter | Description | Required |
Data Source Name | Unique identifier of the data source within the workspace | Yes |
JDBC URL | jdbc:postgresql://host:port/database | Yes |
Username. | Database connection account | Yes |
Password | Database connection password (SSM credential hosting supported) | Yes |
Data Source Version | 12 / 13 / 14 / 15 / 16 | Yes |
jdbc:postgresql://10.0.0.1:5432/mydbjdbc:postgresql://10.0.0.1:5432/mydb?reWriteBatchedInserts=true
Parameter | Description |
reWriteBatchedInserts | Optimize batch insert performance (recommended: true) |
ssl / sslmode | SSL connection configuration |
connectTimeout | Connection timeout (seconds) |
Configuration Item | Description |
Source Table Scope | Specified tables (only selected tables are synchronized; new tables require a restart) / regex matching (specify database name + table name regex; new tables that match the rule are automatically added). |
Read Mode | Full + incremental / Incremental only |
Parameter | Description |
Database / Schema / Table | Required. Schema defaults to public. Table supports the range table_[0-99] |
Split Key | Supports integer fields only; primary key or index columns recommended. |
Filtering Condition | Standard WHERE syntax |
ALTER SYSTEM SET wal_keep_size = '1GB';wal_level is not supported?wal_level is not set to logical.ALTER SYSTEM SET wal_level = 'logical';-- Restart the database after the modification.
max_replication_slots is too small:ALTER SYSTEM SET max_replication_slots = 20;
REPLICA IDENTITY is not set:ALTER TABLE your_table REPLICA IDENTITY FULL;
pg_hba.conf does not allow connections from the DataBuddy network segment. Add the following to the file:host all wedata_user 10.0.0.0/8 md5host replication wedata_cdc_user 10.0.0.0/8 md5
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários