Minipg Puts PostgreSQL 18 in One Executable That Starts on Demand and Stops After 60 Idle Seconds. Its Author Says Not to Trust It With Data Yet. Here Is Where I'd Use It Anyway.
Minipg hit the Hacker News front page on November 26 with a tagline I can't stop thinking about: "SQLite and PostgreSQL had a baby." It's a single MIT-licensed executable that runs PostgreSQL 18. You point it at a .pgdb directory, it starts a server when a command needs one, and it shuts the server down after 60 seconds with no client connections. The database is a folder, and a stopped one can be copied like any folder.
I pick SQLite for most new side projects, and the reason is rarely technical. It's that I don't want to run Docker on my laptop just to have a database for a weekend app. If Postgres can feel that light, that choice changes. So I read the README end to end. Here's what it is, what the author warns about, and where I'd use it.
How it works
Minipg isn't a rebuild of Postgres. It embeds the official postgres:18-alpine image's root filesystem and runs Alpine's own Postgres binaries under hyper9, a hypervisor library by the same author (progrium). There's no Docker, no VM image and no Linux kernel boot. The project is written in Zig.
The first run unpacks the embedded root, about 90 MB, into a cache directory, which takes a few seconds. After that, each psql or pg_dump call runs in its own short-lived machine that starts in about 90 ms.
Using it looks like this:
# open psql, creating the database if it doesn't exist minipg app.pgdb # run one statement minipg app.pgdb "select 1" # run your app with DATABASE_URL set for you minipg run app.pgdb -- npm start
The server listens on TCP at 127.0.0.1 by default. The port is chosen at init and reused when it's free. Everything lives inside the .pgdb directory: a minipg.toml with settings and the generated superuser password, the pgdata/ directory as plain files, and a lock file. The idle timeout is the MINIPG_IDLE environment variable, in seconds, defaulting to 60. minipg serve runs in the foreground with no timeout. Other major versions are available with init --pg 17. JIT is off, and new clusters use the builtin C.UTF-8 locale, so sorting behaves the same on every platform.
What the author warns you about
This is the part to read twice. The site says minipg "is early" and the README calls it an "early research prototype." The site's own advice is not to trust it with data you can't recreate yet. The latest release when I checked was v0.3, from November 17.
The performance numbers are honest. On hyper9's native backend, it's about 2x slower than native Postgres for one client, and 6x to 12x slower under load. A new connection costs about 27 ms. KVM and macOS Hypervisor.framework haven't been measured.
Platform support is uneven. The README marks Linux x86_64 and Windows x86_64 as tested. Linux arm64 "builds; not run." macOS on Apple Silicon is listed with Hypervisor.framework support but marked "not run." Windows on ARM is unsupported. On Windows, the hypervisor commits guest memory up front, 2 GB per server and 1 GB per running tool, so an 8 GB machine fits about three or four servers at once.
A few smaller sharp edges: if the server process is killed outright, Postgres processes linger for a few seconds holding the lock. minipg restore spools stdin to a temp file because pg_restore misreads custom-format archives on pipes. And nothing in the docs mentions extensions. If your app needs pgvector or PostGIS, assume you're on your own until someone tests it.
Where I'd use it, and where I wouldn't
Local development is the obvious fit. A .pgdb folder per project, ignored by git, that starts when I run the app and goes away when I stop. No Docker Desktop eating 4 GB of RAM in the background. The 2x single-client slowdown doesn't matter when I'm the only client.
CI is the second fit, and maybe the better one. I can build a seeded .pgdb once, cache the folder, and copy it into each test job. The 90 ms per tool call and a few-second first unpack beat pulling a Postgres container on every run. The README gives minipg init test.pgdb as a CI example, so the author has this in mind too.
Per-branch databases are the third. When an agent works on a feature branch and needs to run migrations, I'd rather it copy a folder than touch my shared dev database. A copied .pgdb makes the throwaway nature explicit.
I wouldn't put it anywhere near production, and I wouldn't use it on macOS for anything I care about until someone reports running it there. The README is clear that it hasn't been run there.
Where I could be wrong
I'm comparing this against Docker Postgres, and that may be the wrong baseline for a lot of people. PGlite already gives you Postgres compiled to WebAssembly, in-process, with no hypervisor, and one HN commenter pointed straight at it for browser use. Plain Postgres from Homebrew or apt is also not hard. Minipg's real pitch is the database-as-a-folder model, and whether that's worth a young hypervisor in your stack depends on how often you copy, reset or share dev databases. For me it's weekly. If it's never for you, skip this.
What I'd actually do
I'm trying it this weekend on one project, the smallest one with a Postgres-specific feature (a couple of jsonb queries that SQLite handles badly). The test is simple: install, minipg run app.pgdb -- npm run dev, run my migrations and seed script, run the test suite, then copy the folder to a second machine and check it opens. If all of that works on Linux, I'll move that project's CI to a cached .pgdb and keep production on managed Postgres.
I'll check two things before going further: whether pg_dump from minipg restores cleanly into a normal Postgres 18 (my exit path), and how it behaves when my laptop sleeps with the server running. If either fails, it goes back on the watch list. It's v0.3, so watching is a reasonable place to leave it.
Author
Lukas
@lukcombinator