Minipg: PostgreSQL as a Single Executable
- ID
- 50609
- Status
- summarized
- Published
- 26 Nov 2026, 11:00 AM
- Fetched
- 27 Nov 2026, 3:36 AM
- Provider
- Hacker News
- Category
- dev-community
- Original URL
- https://progrium.github.io/minipg/
- Source URL
- https://hnrss.org/best
Summary
- Score
- 7.5
- Created
- 27 Nov 2026, 3:37 AM
- Tags
- Audience
- developersvibe_codersdatabase_learnerssaas_founders
What happened
Jeff Lindsay's minipg packages PostgreSQL 18 (the postgres:18-alpine image) into a single executable where a .pgdb directory *is* the database — data, config, generated superuser password, and version all live inside it, and `minipg app.pgdb` drops you into a psql shell. It runs the Alpine Postgres binaries directly via h9, a Zig library with a Plan 9-style kernel answering syscalls, so there is no Linux kernel boot, no VM image, and no Docker; the server starts when a command needs it and stops when idle. Platform support is Linux x86_64 (KVM, or h9's native backend on Linux 5.11+), Linux arm64, macOS on Apple Silicon via Hypervisor.framework, and a browser demo (~35 MB) that needs JavaScript Promise Integration in Chrome/Edge 137+. MIT licensed, builds with Zig 0.16.
Why it matters
The concrete win is CI: the README's example is just `minipg init test.pgdb` then `minipg run test.pgdb -- go test ./...` — a static binary needing no privileges, no devices, and no Docker, with DATABASE_URL set for you. If you maintain a docker-compose Postgres service just to run tests or spin up a local dev DB, this is a drop-in candidate worth timing against your current setup; check first whether you depend on extensions (pgvector etc.), Postgres versions other than 18, or Intel Macs, none of which this covers.
Discussion angle
Would you actually replace your docker-compose Postgres (or a hosted dev DB) with minipg for CI and local work? Walk through what breaks: extension support, version pinning, the Apple Silicon-only macOS story, and the ~90 ms per-command h9 machine startup when scripts shell out to psql/pg_dump repeatedly.