Function mz_storage::source::postgres::replication::extract_transaction

source ยท
fn extract_transaction<'a>(
    stream: impl AsyncStream<Item = Result<ReplicationMessage<LogicalReplicationMessage>, TransientError>> + 'a,
    commit_lsn: MzOffset,
    table_info: &'a BTreeMap<u32, BTreeMap<usize, SourceOutputInfo>>,
    connection_config: &'a Config,
    ssh_tunnel_manager: &'a SshTunnelManager,
    metrics: &'a PgSourceMetrics,
    publication: &'a str,
    errored_outputs: &'a mut HashSet<usize>,
) -> impl AsyncStream<Item = Result<(u32, usize, Result<Vec<Option<Bytes>>, DefiniteError>, Diff), TransientError>> + 'a
Expand description

Extracts a single transaction from the replication stream delimited by a BEGIN and COMMIT message. The BEGIN message must have already been consumed from the stream before calling this function.