minipg Packs PostgreSQL Into a Single Executable
progrium released minipg, an MIT-licensed tool that runs the official postgres:18-alpine image as a single executable. A .pgdb directory holds the data, settings, credentials and Postgres version, and commands like psql, serve, run, dump and restore start a background server only when needed. It runs on Linux x86_64 and arm64, Apple Silicon macOS, and in a browser demo that downloads about 35 MB. The author says it is early and that on h9's native backend Postgres is about 2x slower than native for one client, and slower under load; he advises against storing data you cannot recreate. Building requires Zig 0.16.
minipg runs Postgres through h9, a small Zig library from the same author that executes guest binaries directly on the host's hypervisor instead of booting a full virtual machine. h9's Linux personality, documented in November 2026, lets Linux binaries run alongside 9front ones in the same machine, with their system calls served by a Plan 9 kernel in the host process. That is what lets minipg unpack the postgres:18-alpine image and run Alpine's own Postgres binaries with no Linux kernel, VM image, or Docker.
For CI jobs, the Linux binary is static and needs no privileges or devices, so a test step can be as short as `minipg init test.pgdb` followed by `minipg run test.pgdb -- go test ./...`. Teams already using PGlite or embedded-postgres should note the author's stated reason for building this: PGlite runs in single-connection mode, while minipg runs a real Postgres server. The 2x slowdown and the early-stage warning mean it is not yet a drop-in for production data.
Commenters called the no-kernel approach interesting but questioned the niche, noting that PGlite covers embedded use and embedded-postgres covers throwaway dev and test databases. The author replied that minipg targets SQLite's other role, a simple CLI-friendly database, and that PGlite's single-connection limit was the motivating problem.