PostgreSQL CDC (logical replication)
Schemes: postgres-cdc://, pgcdc://
Query parameters recognised as config fields for this connector. The object-typed tls is set with a JSON literal, e.g. ?tls={...}. Any other ?key=value pair is passed through unchanged as a driver option on the connection URL.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
checkpoint_store | string | no | — | Local file (path or file://) for resume state; unset, the slot alone tracks the stream. |
consume | capture_new | capture_all | snapshot | no | — | (Consumer only) What to read: capture_new (default, changes only), capture_all (backfill the tables first, then changes) or snapshot (backfill only). |
create_publication | boolean | no | false | Create the publication if missing (default false; leave off if it pre-exists). Needs table ownership for publication_tables, or superuser when none are set (FOR ALL TABLES). |
create_slot | boolean | no | true | Create the replication slot if it does not exist. |
cursor_id | string | no | — | Checkpoint key for the confirmed LSN and backfill progress; defaults to slot_name. |
id_hash | fnv1a | sha256 | no | fnv1a | Hash for change message_ids: fnv1a (default, keeps existing dedup state) or sha256. |
publication | string | yes | — | Publication name (must already exist; defines which tables are captured). |
publication_tables | array of string | no | see below | Tables to include when managing the publication (create_publication); may be schema.table. Missing ones are added to an existing publication (never removed). Empty = FOR ALL TABLES (needs superuser). |
slot_name | string | no | mq_bridge_slot | Replication slot name; created if missing when create_slot is true. |
source_metadata | boolean | no | false | Include authoritative mqb.src.postgres_* source positions. Defaults to false. |
split_key_change | boolean | no | — | An update that changes the primary key becomes a delete of the old key, then the update. |
status_interval_ms | integer | no | 10000 | Standby-status-update interval in ms; must be shorter than the server’s wal_sender_timeout. |
temporary_slot | boolean | no | false | Ephemeral run: drop the slot when the route stops. Not restart-safe; a hard crash leaks it. |
tls | object | no | see below | TLS configuration for the replication connection. |
url | string | yes | — | Connection URL, e.g. postgres://user:pass@host:5432/dbname. |
Struct-typed fields
publication_tables
[]
tls
TLS configuration for secure connections.
Configures Transport Layer Security (TLS/SSL) for encrypted communication. Supports both client certificate (mutual TLS) and server certificate validation.
Examples
use mq_bridge::models::TlsConfig;
let tls = TlsConfig {
required: true,
ca_file: Some("/path/to/ca.pem".to_string()),
cert_file: Some("/path/to/cert.pem".to_string()),
key_file: Some("/path/to/key.pem".to_string()),
..Default::default()
};
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
accept_invalid_certs | boolean | no | false | If true, disable server certificate verification (insecure). |
ca_file | string | no | — | Path to the CA certificate file. |
cert_file | string | no | — | Path to the client certificate file (PEM). |
cert_password | string | no | — | Password for the private key (if encrypted). |
key_file | string | no | — | Path to the client private key file (PEM). |
required | boolean | no | false | If true, enable TLS/SSL. |