PGlite
PostgreSQL compiled to WebAssembly, running in the browser, Node.js, and other JS runtimes.
HN commenters like it for running a real Postgres in memory or in the browser123, without Docker or a running server, especially for tests and local development.456 The most common caveat is that it runs in single-user mode with one connection at a time78, and some extensions such as PostGIS are not supported.9
Why people recommend it
No server needed · 3
Gives a real Postgres instance without Docker or a running pg server.
“I used PGLite for a project (monkeys.zip) and it was absolutely fantastic!”
“I use an in-memory Postgres (PGLite) to describe the queries”
Show 1 more
“I use pglite for unit/integration tests and it's been fantastic.”
In-browser Postgres · 3
Runs Postgres directly in the user's browser via WASM.
“For most purposes, it works perfectly fine”
Show 1 more
“PGlite (PostgreSQL in WASM) lets it run anywhere Node.js does”
Works reliably · 3
Users describe it as fantastic and working fine for most purposes.
“I used PGLite for a project (monkeys.zip) and it was absolutely fantastic!”
“For most purposes, it works perfectly fine”
Show 1 more
“I use pglite for unit/integration tests and it's been fantastic.”
Caveats and dissent
Single connection · 2
Single-user mode allows only one connection, so no concurrent transactions.
“I use pglite for unit/integration tests and it's been fantastic.”
“For most purposes, it works perfectly fine”
Limited extensions · 1
Not all Postgres extensions are supported, notably PostGIS, though pgvector works.
“For most purposes, it works perfectly fine”
Heavy footprint · 1
One user found it too heavy for a browser project and switched to SQLite.
“I found it a bit heavy so I used SQLite instead.”
Scaling habits · 1
Running so easily locally can encourage patterns that don't scale horizontally in production.
“I used PGLite for a project (monkeys.zip) and it was absolutely fantastic!”
Often compared with
Threads where it came up
- PGLite Evangelism 2 mentions
- PGlite – Embeddable Postgres 2 mentions
- Show HN: Bun-sqlgen – Type-safe raw SQL for Bun, no ORM 1 mention
- Anchor Engine – deterministic semantic memory for LLMs, <1GB RAM runs on a phone 1 mention
- Go ahead, self-host Postgres 1 mention
Also written as pglite, PGLite. Data: pglite.json. Quotes are verbatim; the verdict and theme labels are written by a model from these comments, and every clause links to its sources.
All comments 7
“I use an in-memory Postgres (PGLite) to describe the queries”
“I use pglite for unit/integration tests and it's been fantastic.”
“I used PGLite for a project (monkeys.zip) and it was absolutely fantastic!”
“PGlite (PostgreSQL in WASM) lets it run anywhere Node.js does”
“For most purposes, it works perfectly fine”
“PGlite is fantastic.”
“I found it a bit heavy so I used SQLite instead.”