Skip to main content

create_replication_slot

Function create_replication_slot 

Source
async fn create_replication_slot(
    client: &Client,
    slot: &str,
    query: Sql,
    timeout: Duration,
) -> Result<Option<SimpleQueryRow>, TransientError>
Expand description

Runs the CREATE_REPLICATION_SLOT command query for slot, failing with TransientError::ReplicationSlotCreationTimeout once the command has waited timeout for in-progress upstream transactions to end.

A failure inside a transaction leaves that transaction aborted.