minipg turns PostgreSQL into a single executable with no server to configure
Minipg: PostgreSQL as a Single Executable
minipg packages PostgreSQL as one executable: a .pgdb directory holds the data, config, credentials, and Postgres version, and a server spins up only when a command needs it, then stops when idle. It embeds Docker Hub's postgres:18-alpine image and runs Alpine's own binaries through h9, a Zig library whose Plan 9 kernel answers system calls, so there's no Linux kernel, VM image, or Docker. It's early, and roughly 2x slower than native on one client.
Don't trust it with data you can't recreate yet.
- t3ntxcles
Cool hack, getting fork-per-connection postgres running with no kernel is quite interesting
I'm struggling to see the use case for minipg itself. For embedded or in-process postgres there's pglite as mentioned in comments. For dev/test parity there's embedded-postgres (go, java, node, python), which downloads native binaries and gives you a throwaway postgres with no docker. These by themselves cover what most people would want from "sqlite-style postgres," without the hypervisor layer or significant slow down.
Is minipg intended to become a real tool, or is it mainly a showcase for h9, with Postgres as the hard case that proves it works?
- dolmen
Looks useful for CI.
- Ciantic
I can see this very useful for small self-hosted applications. I could imagine deploying this instead of sqlite in some cases. Though having a real server is not maybe ideal for self-hosted apps.
For unit tests I've found that I don't need PGLite or other tools, only podman and official images.
Regular postgres starts in 800 milliseconds, TimeScale DB in 1 second.
I have setup where first unit test that starts podman container and after finish it ends it all. On each test I create new database (or search path), time it takes to create db is in milliseconds.
Trick is to use `--image-volume tmpfs` when starting the container. I have my pg test server as Rust in here: https://github.com/Ciantic/app-frame/blob/main/crates/pgtest...
- phmx
Author's post on the subject -- https://progrium.xyz/articles/2026/single-binary-postgres/
- nomercy400
Impressive. Uses postgres alpine's docker image, without docker. Instead it used h9, a young embedded hypervisor tool.