Skip to main content

drop_replication_slot

Function drop_replication_slot 

Source
pub async fn drop_replication_slot(
    client: &Client,
    slot_name: &str,
) -> Result<(), ConnectorError>
Expand description

Drop a PostgreSQL logical replication slot.

Use this for administrative cleanup when a pipeline is permanently deleted and the slot is no longer needed. Do NOT call this on normal shutdown — the slot must survive restarts for resume-from-checkpoint.

An unconsumed slot holds WAL on the server until it is either consumed or dropped. Monitor pg_replication_slots for stale slots.

§Errors

Returns ConnectorError if the DROP fails (e.g., slot does not exist, or it is still active).