pub async fn connect(
config: &PostgresCdcConfig,
) -> Result<(Client, JoinHandle<()>), ConnectorError>Expand description
Connects to PostgreSQL as a regular (control-plane) connection.
This connection is used for slot management and metadata queries.
WAL streaming uses a separate pgwire-replication client (see
build_replication_config()).
Spawns a background task to drive the connection. The caller must
keep the returned JoinHandle alive; dropping it will close the
connection.
§TLS
Currently only supports NoTls. Non-Disable SSL modes will log
a warning and fall back to NoTls. TLS support is planned as a
follow-up.
§Errors
Returns ConnectorError::ConnectionFailed if the connection fails.