packages feed

postgresql-replicant 0.2.0.0 → 0.2.0.1

raw patch · 14 files changed

+58/−3 lines, 14 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -5,6 +5,15 @@  ## [Unreleased] +## [0.2.0.1] - 2021-10-30++This is a memory performance improvement update.  We made all of the+modules strict which significantly reduced unnecessary allocations and+makes memory usage constant.++### Changed+- Added `Strict` pragmas to all modules+ ## [0.2.0.0] - 2021-07-27  This is a minor update that adds a replication connection type,
README.md view
@@ -8,6 +8,10 @@ production yet.  Developers are encouraged to test out the library, add issues, contribute and make it awesome. +For more, read the find+[documentation](https://agentultra.github.io/postgresql-replicant+"postgresql-replicant documentation")+ ## Setup  In order to use a logical replication client you need to set the@@ -55,7 +59,7 @@  main :: IO () main = do-  let settings = PgSettings "my-user" "my-database" "localhost" "5432" "testing"+  let settings = PgSettings "my-user" (Just "my-password") "my-database" "localhost" "5432" "testing"   withLogicalStream settings $ \change -> do     print change     return $ changeNextLSN change@@ -105,6 +109,26 @@ - `PG_SLOTNAME`: The replication slot to create or connect to - `PG_UPDATEDELAY`: The frequency (in _ms_) to update PostgreSQL on   the stream status++## Profiling++To enable profile builds, see `stack.yaml`++Build `stack build`++Then run `stack exec --profile -- replicant-example +RTS -p` (make+sure to set the right database configs)++Run `bin/bench.sh my-database create` if this is the first time+running the bench.  This will create a table called,+`replicant_profile`.++Run `bin/bench.sh my-database`, wait a bit, cancel it.  It will insert+a bunch of rows into `replicant_profile`.  Feel free to run other SQL+statements that modify the table while the bench is running.  Cancel+the script when you're done.++Then you can generate reports, see the [GHC Manual on Profiling](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html# "GHC Manual on Profiling")  ## FAQ 
postgresql-replicant.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 79c5f5333f3b93e29420feb572c62237df61efdaa111a3a4425edb8247a2239f+-- hash: 80d44b489e1afa79f203f2eaf7019c98ad0b54bb0736f607debbe8f896604192  name:           postgresql-replicant-version:        0.2.0.0+version:        0.2.0.1 synopsis:       PostgreSQL logical streaming replication library description:    Please see the README on GitHub at <https://github.com/agentultra/postgresql-replicant#readme> category:       Experimental, Database
src/Database/PostgreSQL/Replicant.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ {-| Module      : Database.PostgreSQL.Replicant Description : A PostgreSQL streaming replication library
src/Database/PostgreSQL/Replicant/Connection.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ {- Module : Database.PostgreSQL.Replicant.Connection Description : Create replication handling connections to PostgreSQL
src/Database/PostgreSQL/Replicant/Exception.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ module Database.PostgreSQL.Replicant.Exception where  import Control.Exception
src/Database/PostgreSQL/Replicant/Message.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ {-| Module      : Database.PostgreSQL.Replicant.Message Description : Streaming replication message types
src/Database/PostgreSQL/Replicant/PostgresUtils.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ module Database.PostgreSQL.Replicant.PostgresUtils where  import Data.Fixed
src/Database/PostgreSQL/Replicant/Protocol.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ {-| Module      : Database.PostgreSQL.Replicant.Protocol Description : Streaming replication protocol
src/Database/PostgreSQL/Replicant/ReplicationSlot.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ {-| Module      : Database.PostgreSQL.Replicant.ReplicationSlot Description : Replication slot query commands
src/Database/PostgreSQL/Replicant/Serialize.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ module Database.PostgreSQL.Replicant.Serialize where  import Data.ByteString (ByteString)
src/Database/PostgreSQL/Replicant/Settings.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ module Database.PostgreSQL.Replicant.Settings where  import Data.ByteString (ByteString)
src/Database/PostgreSQL/Replicant/State.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ {-| Module      : Database.PostgreSQL.Replicant.State Description : Internal replication stream state
src/Database/PostgreSQL/Replicant/Types/Lsn.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Strict #-}+ {-| Module      : Database.PostgreSQL.Replicant.Types.Lsn Description : Types and parsers for LSNs