Expand description
PostgreSQL logical replication CDC source connector. PostgreSQL CDC source connector.
Streams row-level changes from PostgreSQL using logical replication (pgoutput plugin). Supports INSERT, UPDATE, DELETE operations with Z-set changelog integration.
§Architecture
Ring 0 (Hot Path): SPSC pop only (~5ns, zero CDC code)
Ring 1 (Background): WAL consumption → pgoutput decode → Arrow conversion
Ring 2 (Control): Slot management, schema discovery, health checks§Module Structure
config- Connection and replication configurationlsn- Log Sequence Number typetypes- PostgreSQL OID to Arrow type mappingdecoder- pgoutput binary protocol parserschema- Relation (table) schema cachechangelog- Z-set change event conversionmetrics- Lock-free atomic CDC metricssource-PostgresCdcSourceimplementingSourceConnector
§Usage
ⓘ
use laminar_connectors::cdc::postgres::{PostgresCdcSource, PostgresCdcConfig};
let config = PostgresCdcConfig::new("localhost", "mydb", "laminar_slot", "laminar_pub");
let mut source = PostgresCdcSource::new(config);Re-exports§
pub use config::PostgresCdcConfig;pub use config::SnapshotMode;pub use config::SslMode;pub use lsn::Lsn;pub use source::PostgresCdcSource;
Modules§
- changelog
- Z-set changelog integration for
PostgreSQLCDC events. - config
PostgreSQLCDC source connector configuration.- decoder
PostgreSQLpgoutputlogical replication protocol decoder.- lsn
PostgreSQLLog Sequence Number (LSN) type.- metrics
PostgreSQLCDC source connector metrics.- postgres_
io PostgreSQLlogical replication I/O functions.- schema
PostgreSQLrelation schema cache.- source
PostgreSQLCDC source connector implementation.- types
PostgreSQLtype OID to ArrowDataTypemapping.
Functions§
- register_
postgres_ cdc - Registers the
PostgreSQLCDC source connector with the given registry.