| Copyright | (c) James King 2020 2021 |
|---|---|
| License | BSD3 |
| Maintainer | james@agentultra.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
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
- data ReplicationSlotInfo = ReplicationSlotInfo {}
- data ReplicationSlotType
- parseSlotType :: ByteString -> ReplicationSlotType
- data ReplicationSlotActive
- parseSlotActive :: ByteString -> ReplicationSlotActive
- createReplicationSlotCommand :: ReplicantConnection -> ByteString -> IO ByteString
- createReplicationSlotSync :: ReplicantConnection -> ByteString -> IO ReplicationSlotInfo
- getReplicationSlotInfoCommand :: ReplicantConnection -> ByteString -> IO ByteString
- getReplicationSlotSync :: ReplicantConnection -> ByteString -> IO (Maybe ReplicationSlotInfo)
- setupReplicationSlot :: ReplicantConnection -> ByteString -> IO ReplicationSlotInfo
Documentation
data ReplicationSlotInfo Source #
Constructors
| ReplicationSlotInfo | |
Fields | |
Instances
| Eq ReplicationSlotInfo Source # | |
Defined in Database.PostgreSQL.Replicant.ReplicationSlot Methods (==) :: ReplicationSlotInfo -> ReplicationSlotInfo -> Bool # (/=) :: ReplicationSlotInfo -> ReplicationSlotInfo -> Bool # | |
| Show ReplicationSlotInfo Source # | |
Defined in Database.PostgreSQL.Replicant.ReplicationSlot Methods showsPrec :: Int -> ReplicationSlotInfo -> ShowS # show :: ReplicationSlotInfo -> String # showList :: [ReplicationSlotInfo] -> ShowS # | |
data ReplicationSlotType Source #
Constructors
| Logical | |
| Physical | |
| UnknownSlotType |
Instances
| Eq ReplicationSlotType Source # | |
Defined in Database.PostgreSQL.Replicant.ReplicationSlot Methods (==) :: ReplicationSlotType -> ReplicationSlotType -> Bool # (/=) :: ReplicationSlotType -> ReplicationSlotType -> Bool # | |
| Show ReplicationSlotType Source # | |
Defined in Database.PostgreSQL.Replicant.ReplicationSlot Methods showsPrec :: Int -> ReplicationSlotType -> ShowS # show :: ReplicationSlotType -> String # showList :: [ReplicationSlotType] -> ShowS # | |
data ReplicationSlotActive Source #
Instances
| Eq ReplicationSlotActive Source # | |
Defined in Database.PostgreSQL.Replicant.ReplicationSlot Methods (==) :: ReplicationSlotActive -> ReplicationSlotActive -> Bool # (/=) :: ReplicationSlotActive -> ReplicationSlotActive -> Bool # | |
| Show ReplicationSlotActive Source # | |
Defined in Database.PostgreSQL.Replicant.ReplicationSlot Methods showsPrec :: Int -> ReplicationSlotActive -> ShowS # show :: ReplicationSlotActive -> String # showList :: [ReplicationSlotActive] -> ShowS # | |
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.