postgresql-replicant-0.2.0.1: PostgreSQL logical streaming replication library
Copyright(c) James King 2020 2021
LicenseBSD3
Maintainerjames@agentultra.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Replicant.ReplicationSlot

Description

This module contains the PostgreSQL queries, types, and functions for working with querying, creating, and working with replication slots.

Synopsis

Documentation

createReplicationSlotSync :: ReplicantConnection -> ByteString -> IO ReplicationSlotInfo Source #

Create a replication slot using synchronous query execution.

May throw an exception if the command fails.

getReplicationSlotSync :: ReplicantConnection -> ByteString -> IO (Maybe ReplicationSlotInfo) Source #

Get information about an existing replication slot. Returns Nothing when the requested slot cannot be found.

May throw an exception if the command query fails.

setupReplicationSlot :: ReplicantConnection -> ByteString -> IO ReplicationSlotInfo Source #

Create replication slot or retrieve an existing slot.

Can throw exceptions from getReplicationSlotSync or createReplicationSlotSync.