# minipg turns PostgreSQL into a single executable with no server to configure

Original title: Minipg: PostgreSQL as a Single Executable

> Hacker News story 50650892 · language: en · submitted 2026-11-26
> Web version: https://zeli.app/story/50650892
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 280 · by [rguiscard](<https://news.ycombinator.com/user?id=rguiscard>) · 💬 44
[original](<https://progrium.github.io/minipg/>) · [HN discussion](<https://news.ycombinator.com/item?id=50650892>)

## Summary

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.

## Key quote

> Don't trust it with data you can't recreate yet.

## HN discussion (44 comments)

### [t3ntxcles](<https://news.ycombinator.com/item?id=50655422>)

> 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](<https://news.ycombinator.com/item?id=50655714>)

> Looks useful for CI.

### [Ciantic](<https://news.ycombinator.com/item?id=50653690>)

> 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](<https://news.ycombinator.com/item?id=50653200>)

> Author's post on the subject -- https://progrium.xyz/articles/2026/single-binary-postgres/

### [nomercy400](<https://news.ycombinator.com/item?id=50652064>)

> Impressive. Uses postgres alpine's docker image, without docker. Instead it used h9, a young embedded hypervisor tool.

---

## Cite

- Page: https://zeli.app/story/50650892
- Date: 2026-11-26
- Source: progrium.github.io (https://progrium.github.io/minipg/)
- Hacker News: https://news.ycombinator.com/item?id=50650892

## Other languages

- zh: https://zeli.app/zh/story/50650892 · markdown: https://zeli.app/zh/story/50650892.md
- ja: https://zeli.app/ja/story/50650892 · markdown: https://zeli.app/ja/story/50650892.md
- ko: https://zeli.app/ko/story/50650892 · markdown: https://zeli.app/ko/story/50650892.md
- de: https://zeli.app/de/story/50650892 · markdown: https://zeli.app/de/story/50650892.md
- es: https://zeli.app/es/story/50650892 · markdown: https://zeli.app/es/story/50650892.md
- ru: https://zeli.app/ru/story/50650892 · markdown: https://zeli.app/ru/story/50650892.md
