@hackage / ephemeral-pg

Temporary PostgreSQL databases for testing

Latest0.2.2.0

Changelog

Changelog

0.2.2.0

Bug Fixes
  • Make initdb cache creation atomic by copying into a same-parent temporary directory and publishing it with an atomic rename. Concurrent cold-cache writers now treat an existing final cache as success instead of exposing a partially-copied data directory.

0.2.1.0

Bug Fixes
  • Fix stop and restart ignoring configured shutdown mode and timeout — they were hardcoding ShutdownGraceful with a 30-second timeout instead of using the config values, causing with/withCached to block unnecessarily on shutdown
Other Changes
  • Change default shutdown mode to ShutdownFast (SIGINT) with a 5-second timeout, which is more appropriate for a testing library

0.2.0.1

Bug Fixes
  • Suppress pg_isready stdout/stderr during connection polling

0.2.0.0

Breaking Changes
  • Remove Hungarian-style field prefixes from all record types using NoFieldSelectors, DuplicateRecordFields, and OverloadedRecordDot
    • Config: configPortport, configDatabaseNamedatabaseName, etc.
    • Database: dbPortport, dbDataDirectorydataDirectory, etc.
    • PostgresProcess: postgresProcessprocess, postgresPidpid
    • DumpOptions: dumpFormatformat, dumpCreateDbcreateDb, etc.
    • Snapshot: snapshotPathpath, snapshotTemporarytemporary
    • CacheKey: cacheKeyPgVersionpgVersion, cacheKeyConfigHashconfigHash
    • CacheConfig: cacheConfigRootroot, cacheConfigCowcow, cacheConfigEnabledenabled
    • Error types: all prefixed fields renamed similarly
  • Remove accessor functions from Database module (dataDirectory, socketDirectory, port, databaseName, user); use dot syntax instead (e.g., db.port)
  • Database is now exported with (..) from EphemeralPg for HasField resolution
  • Consumers should enable OverloadedRecordDot to access record fields

0.1.0.0

  • Initial release
  • Core functionality: with, withConfig, start, stop
  • Hasql integration via connectionSettings
  • initdb caching support
  • Copy-on-write support for macOS and Linux
  • Snapshot support