[0.1.2] - 2026-06-12
Fixed
- A relative
:pgdatapath (e.g. the defaultpriv/db/data) broke startup since 0.1.1: it was passed verbatim asunix_socket_directories, which Postgres resolves against its own working directory — failing withcould not create lock fileand surfacing as:postgres_start_timeout.:pgdatais now expanded to an absolute path on init.
[0.1.1] - 2026-06-12
Changed
- Repository moved to https://github.com/saschabrink/pg_spawner.
- CI tests against Elixir 1.19 and 1.20 via the Nix flake dev shells.
- README badges for Hex version, docs, CI status, and license.
Fixed
- Postgres now starts with
unix_socket_directoriespinned to the pgdata directory. Linux builds that default the socket to/run/postgresql(e.g. nixpkgs) previously died on startup when that directory wasn't writable — surfacing as:postgres_start_timeout.
[0.1.0] - 2026-05-12
Added
PgSpawnerGenServer — starts Postgres as a BEAM-owned child viaPort.open/2, with a shell watchdog that guarantees cleanup on SIGKILL.- Guest mode: joins an already-running Postgres without owning the lifecycle.
:log_fileoption — Postgres output goes to<pgdata>/postgres.logby default instead of the BEAM console. Pass:stdioto restore console output,nilto discard.- OTP Application auto-start — adding
:pg_spawnerto deps is sufficient to start Postgres on app boot. Defaults:port: 15432,pgdata: "priv/db/data". Override viaconfig :pg_spawner, .... Setpgdata: falseto disable. - Auto-
initdb: PgSpawner bootstrapspgdataon first run if noPG_VERSIONis present. No shellHook ceremony required.