tmp-postgres 1.30.0.0 → 1.30.0.1
raw patch · 4 files changed
+24/−5 lines, 4 files
Files
- CHANGELOG.md +4/−0
- src/Database/Postgres/Temp/Internal.hs +16/−3
- test/Main.hs +3/−1
- tmp-postgres.cabal +1/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ Changelog for tmp-postgres +1.30.0.1+ #221 Make verboseConfig support pgbadger+ #218 Document difference between takeSnapshot and cacheAction+ 1.30.0.0 #217 verboseConfig is not verbose enough #216 cacheAction does not handle ~ properly bug
src/Database/Postgres/Temp/Internal.hs view
@@ -247,12 +247,18 @@ , ("synchronous_commit", "off") , ("full_page_writes", "off") , ("log_min_duration_statement", "0")- , ("log_connections", "on")- , ("log_disconnections", "on") , ("client_min_messages", "WARNING") , ("log_min_messages", "WARNING") , ("log_min_error_statement", "WARNING")- , ("log_statement", "all")+ , ("log_checkpoints", "on")+ , ("log_connections", "on")+ , ("log_disconnections", "on")+ , ("log_lock_waits", "on")+ , ("log_temp_files", "0")+ , ("log_autovacuum_min_duration", "0")+ , ("log_error_verbosity", "default")+ , ("log_line_prefix", "'%t [%p]: '")+ , ("lc_messages", "'C'") ] {-|@@ -631,6 +637,9 @@ withConfig (snapshotConfig db) $ \\migratedDb -> ... @ +The 'Snapshot's are ephemeral. If you would like the 'Snapshot's to persistent+consider using 'cacheAction' instead.+ @since 1.29.0.0 -} withSnapshot@@ -678,6 +687,10 @@ @ initialConfig <> configFromCachePath @++'cacheAction' can be used to create a snapshot of migrated database and not+remigrate as long as the migration does not change. See 'withSnapshot' for+a ephemeral version of taking snapshots. @since 1.29.0.0 -}
test/Main.hs view
@@ -379,7 +379,9 @@ it "withDbCache seems to work" $ withDbCache $ \cacheInfo ->- either throwIO pure =<< withConfig (cacheConfig cacheInfo) assertConnection+ either throwIO pure <=< withConfig (cacheConfig cacheInfo <> verboseConfig) $ \db -> do+ assertConnection db+ withConn db $ \conn -> countDbs conn `shouldReturn` 3 it "postgresql.conf append last wins" $ withConfig' (verboseConfig <> defaultPostgresConf [("fsync", "on")]) $ \db -> do
tmp-postgres.cabal view
@@ -1,5 +1,5 @@ name: tmp-postgres-version: 1.30.0.0+version: 1.30.0.1 synopsis: Start and stop a temporary postgres description: Start and stop a temporary postgres. See README.md homepage: https://github.com/jfischoff/tmp-postgres#readme