# `PgSpawner`
[🔗](https://github.com/exfoundry/pg_spawner/blob/v0.1.0/lib/pg_spawner.ex#L1)

Starts Postgres as an OS-level child of the BEAM via `Port.open/2`.

When BEAM exits (including SIGKILL), a shell watchdog kills Postgres too.
No PID files, no stale processes.

If Postgres is already running on the configured port, joins as a *guest*
and does not own the lifecycle. See README for details.

## Usage

    children = [
      {PgSpawner, port: 15432, pgdata: "priv/db/data"}
    ]

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
