Packages

Zero-config local Postgres for Elixir. Add the dep, Postgres boots with your app — auto-initdb, no PID files, no stale processes.

Current section

Files

Jump to
pg_spawner CHANGELOG.md
Raw

CHANGELOG.md

# Changelog
## [0.1.0] - 2026-05-12
### Added
- `PgSpawner` GenServer — starts Postgres as a BEAM-owned child via `Port.open/2`, with a shell watchdog that guarantees cleanup on SIGKILL.
- Guest mode: joins an already-running Postgres without owning the lifecycle.
- `:log_file` option — Postgres output goes to `<pgdata>/postgres.log` by default instead of the BEAM console. Pass `:stdio` to restore console output, `nil` to discard.
- OTP Application auto-start — adding `:pg_spawner` to deps is sufficient to start Postgres on app boot. Defaults: `port: 15432`, `pgdata: "priv/db/data"`. Override via `config :pg_spawner, ...`. Set `pgdata: false` to disable.
- Auto-`initdb`: PgSpawner bootstraps `pgdata` on first run if no `PG_VERSION` is present. No shellHook ceremony required.